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
97aa3d85
Commit
97aa3d85
authored
Sep 06, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
随机图片
parent
aedbfe92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
route.php
application/route.php
+1
-0
JobTask.php
application/task/controller/JobTask.php
+24
-0
No files found.
application/route.php
View file @
97aa3d85
...
@@ -444,6 +444,7 @@ Route::group('task', [
...
@@ -444,6 +444,7 @@ Route::group('task', [
'updateShopTask'
=>
[
'task/JobTask/updateShopTask'
,
[
'method'
=>
'post | get'
]
],
//默认跟进
'updateShopTask'
=>
[
'task/JobTask/updateShopTask'
,
[
'method'
=>
'post | get'
]
],
//默认跟进
'updateShopImageIdTask'
=>
[
'task/JobTask/updateShopImageIdTask'
,
[
'method'
=>
'post | get'
]
],
//默认图片
'push'
=>
[
'task/PushMessageTask/push'
,
[
'method'
=>
'get'
]
]
//推送
'push'
=>
[
'task/PushMessageTask/push'
,
[
'method'
=>
'get'
]
]
//推送
]);
]);
...
...
application/task/controller/JobTask.php
View file @
97aa3d85
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
app\task\controller
;
namespace
app\task\controller
;
use
app\index\service\ImageDepotService
;
use
app\model\GHouses
;
use
app\model\GHouses
;
/**
/**
...
@@ -58,5 +59,27 @@ class JobTask
...
@@ -58,5 +59,27 @@ class JobTask
}
}
public
function
updateShopImageIdTask
()
{
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
$image
=
new
ImageDepotService
();
$field
=
"id,industry_type,update_time"
;
$params
=
[];
$total
=
$this
->
gHouseModel
->
getHouseListTotal
(
$params
);
$pageSize
=
200
;
$pageTotal
=
ceil
(
$total
/
$pageSize
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$houseList
=
$this
->
gHouseModel
->
getShopList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$houseArr
=
[];
foreach
(
$houseList
as
$item
)
{
$industry_type
=
explode
(
','
,
$item
[
'industry_type'
]);
$houseBin
[
'external_image_id'
]
=
$image
->
getImage
(
$industry_type
[
0
]);
$houseBin
[
"id"
]
=
$item
[
"id"
];
$houseBin
[
"update_time"
]
=
$item
[
"update_time"
];
array_push
(
$houseArr
,
$houseBin
);
}
$this
->
gHouseModel
->
updateHouse
(
$houseArr
);
}
}
}
}
\ 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