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
bcc9ac58
Commit
bcc9ac58
authored
Sep 12, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除注释
parent
bbbb27ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
JobTask.php
application/task/controller/JobTask.php
+19
-19
No files found.
application/task/controller/JobTask.php
View file @
bcc9ac58
...
@@ -63,25 +63,25 @@ class JobTask
...
@@ -63,25 +63,25 @@ class JobTask
public
function
updateShopImageIdTask
()
public
function
updateShopImageIdTask
()
{
{
//
set_time_limit(0); // 取消脚本运行时间的超时上限
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
//
$image = new ImageDepotService();
$image
=
new
ImageDepotService
();
//
$field = "id,industry_type,update_time";
$field
=
"id,industry_type,update_time"
;
//
$params = [];
$params
=
[];
//
$total = $this->gHouseModel->getHouseListTotal($params);
$total
=
$this
->
gHouseModel
->
getHouseListTotal
(
$params
);
//
$pageSize = 200;
$pageSize
=
200
;
//
$pageTotal = ceil($total / $pageSize);
$pageTotal
=
ceil
(
$total
/
$pageSize
);
//
for ($pageNo = 1; $pageNo <= $pageTotal; $pageNo++) {
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
//
$houseList = $this->gHouseModel->getShopList($field, $params, $pageNo, $pageSize);
$houseList
=
$this
->
gHouseModel
->
getShopList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
//
$houseArr = [];
$houseArr
=
[];
//
foreach ($houseList as $item) {
foreach
(
$houseList
as
$item
)
{
//
$industry_type = explode(',', $item['industry_type']);
$industry_type
=
explode
(
','
,
$item
[
'industry_type'
]);
//
$houseBin['external_image_id'] = $image->getImage($industry_type[0]);
$houseBin
[
'external_image_id'
]
=
$image
->
getImage
(
$industry_type
[
0
]);
//
$houseBin["id"] = $item["id"];
$houseBin
[
"id"
]
=
$item
[
"id"
];
//
$houseBin["update_time"] = $item["update_time"];
$houseBin
[
"update_time"
]
=
$item
[
"update_time"
];
//
array_push($houseArr, $houseBin);
array_push
(
$houseArr
,
$houseBin
);
//
}
}
//
$this->gHouseModel->updateHouse($houseArr);
$this
->
gHouseModel
->
updateHouse
(
$houseArr
);
//
}
}
}
}
...
...
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