Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
7803afee
Commit
7803afee
authored
May 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下架开盘广场根据商铺状态
parent
1fa967a3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
SquareSortService.php
application/api_broker/service/SquareSortService.php
+18
-0
route.php
application/route.php
+1
-0
SquareTask.php
application/task/controller/SquareTask.php
+36
-0
No files found.
application/api_broker/service/SquareSortService.php
View file @
7803afee
...
...
@@ -164,4 +164,21 @@ class SquareSortService
}
return
$result
;
}
/**
* 删除
* @param $s_id
* @param $site_id
* @return bool
*/
public
function
delSortSquareSort
(
$s_id
,
$site_id
)
{
if
(
!
$s_id
||
$s_id
<=
0
)
{
return
false
;
}
$this
->
redis
->
zRem
(
self
::
SORT_KEY
.
$site_id
,
$s_id
);
$this
->
redis
->
zRem
(
self
::
SORT_KEY_CREAM
.
$site_id
,
$s_id
);
return
true
;
}
}
\ No newline at end of file
application/route.php
View file @
7803afee
...
...
@@ -634,6 +634,7 @@ Route::group('task', [
'frostAgent'
=>
[
'task/FrostAgentTask/frostAgent'
,
[
'method'
=>
'get'
]],
'squareBackUp'
=>
[
'task/SquareTask/squareBackUp'
,
[
'method'
=>
'get'
]],
//redis备份开盘排序
'updateSquare'
=>
[
'task/SquareTask/updateSquare'
,
[
'method'
=>
'get'
]],
'updateActivityStatus'
=>
[
'task/UpdateActivityTask/updateActivityStatus'
,
[
'method'
=>
'get'
]],
...
...
application/task/controller/SquareTask.php
View file @
7803afee
...
...
@@ -8,6 +8,7 @@ use app\api_broker\service\RedisCacheService;
use
app\api_broker\service\SquareSortService
;
use
app\model\BSquare
;
use
app\model\BSquareSort
;
use
app\model\GHouses
;
use
think\Log
;
class
SquareTask
...
...
@@ -110,4 +111,38 @@ class SquareTask
return
;
}
/**
* 下架开盘广场根据商铺状态
*/
public
function
updateSquare
(){
$m_house
=
new
GHouses
();
$s_square_sort
=
new
SquareSortService
();
$field
=
'id,house_id,site_id'
;
$params
[
'status'
]
=
0
;
$list
=
$this
->
m_square
->
getSquare
(
$field
,
$params
);
if
(
!
$list
){
exit
;
}
foreach
(
$list
as
$k
=>
$v
)
{
if
(
!
$v
[
'house_id'
]){
continue
;
}
$house_status
=
$m_house
->
getHouseValue
(
'status'
,
[
'id'
=>
$v
[
'house_id'
]]);
#商铺非上架状态
if
(
$house_status
!=
1
){
$this
->
m_square
->
updateStatus
([
'id'
=>
$v
[
'id'
]],
[
'status'
=>
2
]);
//删除 redis
$s_square_sort
->
delSortSquareSort
(
$v
[
'id'
],
$v
[
'site_id'
]);
continue
;
}
}
exit
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment