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
9e2f56fc
Commit
9e2f56fc
authored
Apr 24, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shop status update
parent
3e0b4cc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
updateShopStatusTask.php
application/task/controller/updateShopStatusTask.php
+19
-2
No files found.
application/task/controller/updateShopStatusTask.php
View file @
9e2f56fc
...
...
@@ -3,6 +3,7 @@
namespace
app\task\controller
;
use
app\model\GHouses
;
use
app\model\SystemConfig
;
/**
...
...
@@ -24,12 +25,28 @@ class updateShopStatusTask
/**
* 每天2点跑一次
* 根据创建时间和系统设置的时间范围内无动态则下架
* @return null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
updateStatusByTime
()
{
//todo 1.查询所有上架的店铺并且创建时间大于设置的自动下架的时间,并且动态无动态标签, 2.查询这些楼盘是否有动态
//todo 3.有动态的打上标签 4.过了时间并且没有动态的下架
$day
=
11
;
$this
->
updateStatusByPact
();
$systemConfigModel
=
new
SystemConfig
();
$where
[
"config_type"
]
=
10
;
$data
=
$systemConfigModel
->
getSetting
(
$where
,
"rule"
);
if
(
$data
&&
$data
[
"down_time"
]
>
0
)
{
$day
=
$data
[
"down_time"
];
}
else
{
return
null
;
}
$field
=
"a.id,b.id as order_id"
;
$params
=
[];
$time_
=
date
(
'Y-m-d'
,
strtotime
(
"-
$day
day"
));
...
...
@@ -53,7 +70,7 @@ class updateShopStatusTask
$this
->
shopModel
->
updateHouse
(
$update_arr
);
}
$this
->
updateStatusByPact
();
}
/**
...
...
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