|
@@ -127,6 +127,7 @@ class SyncInquiryProjectRoute extends Command |
|
@@ -127,6 +127,7 @@ class SyncInquiryProjectRoute extends Command |
|
127
|
*/
|
127
|
*/
|
|
128
|
public function syncGloV6Route($task)
|
128
|
public function syncGloV6Route($task)
|
|
129
|
{
|
129
|
{
|
|
|
|
130
|
+ echo '同步项目ID:' . $task->id . PHP_EOL;
|
|
130
|
$date = intval(date('Ymd'));
|
131
|
$date = intval(date('Ymd'));
|
|
131
|
ProjectServer::useProject($task->primary_id);
|
132
|
ProjectServer::useProject($task->primary_id);
|
|
132
|
// TODO 产品分类标题、路由, 产品标题、路由, 同步到路由表
|
133
|
// TODO 产品分类标题、路由, 产品标题、路由, 同步到路由表
|
|
@@ -138,7 +139,6 @@ class SyncInquiryProjectRoute extends Command |
|
@@ -138,7 +139,6 @@ class SyncInquiryProjectRoute extends Command |
|
138
|
// 产品数量会比较多, 所以使用分页 同步数据
|
139
|
// 产品数量会比较多, 所以使用分页 同步数据
|
|
139
|
$id = 0;
|
140
|
$id = 0;
|
|
140
|
while (true) {
|
141
|
while (true) {
|
|
141
|
- echo '同步项目路由:' . $id . PHP_EOL;
|
|
|
|
142
|
$product = Product::where('status', Product::STATUS_ON)->where('id', '>', $id)->orderBy('id', 'asc')->limit(1000)->get(['id', 'title', 'route']);
|
142
|
$product = Product::where('status', Product::STATUS_ON)->where('id', '>', $id)->orderBy('id', 'asc')->limit(1000)->get(['id', 'title', 'route']);
|
|
143
|
if ($product->isEmpty())
|
143
|
if ($product->isEmpty())
|
|
144
|
break;
|
144
|
break;
|