|
@@ -55,15 +55,16 @@ class RecommendedSuppliers extends Command |
|
@@ -55,15 +55,16 @@ class RecommendedSuppliers extends Command |
|
55
|
foreach ($project_list as $k => $v){
|
55
|
foreach ($project_list as $k => $v){
|
|
56
|
echo date('Y-m-d H:i:s') . 'project_id:'.$v['project_id'] . PHP_EOL;
|
56
|
echo date('Y-m-d H:i:s') . 'project_id:'.$v['project_id'] . PHP_EOL;
|
|
57
|
ProjectServer::useProject($v['id']);
|
57
|
ProjectServer::useProject($v['id']);
|
|
58
|
- $keywordInfo = Keyword::inRandomOrder()->first();
|
|
|
|
59
|
- if(empty($keywordInfo)){
|
58
|
+ $info = Keyword::inRandomOrder()->first();
|
|
|
|
59
|
+ if(empty($info)){
|
|
60
|
continue;
|
60
|
continue;
|
|
61
|
}
|
61
|
}
|
|
62
|
- $keywordInfo = $this->getPurchaser($keywordInfo['title']);
|
62
|
+ $keywordInfo = $this->getPurchaser($info['title'] = 'led');
|
|
63
|
if($keywordInfo !== false){
|
63
|
if($keywordInfo !== false){
|
|
64
|
continue;
|
64
|
continue;
|
|
65
|
}
|
65
|
}
|
|
66
|
- $this->savePurchaser($v['id'],$keywordInfo['title']);
|
66
|
+ echo date('Y-m-d H:i:s') . '开始:'.$v['project_id'] . PHP_EOL;
|
|
|
|
67
|
+ $this->savePurchaser($v['id'],$info['title']);
|
|
67
|
DB::disconnect('custom_mysql');
|
68
|
DB::disconnect('custom_mysql');
|
|
68
|
}
|
69
|
}
|
|
69
|
return true;
|
70
|
return true;
|
|
@@ -95,6 +96,7 @@ class RecommendedSuppliers extends Command |
|
@@ -95,6 +96,7 @@ class RecommendedSuppliers extends Command |
|
95
|
'total'=>$this->param['row'] ?? 10,
|
96
|
'total'=>$this->param['row'] ?? 10,
|
|
96
|
];
|
97
|
];
|
|
97
|
$res = http_post($url,json_encode($param));
|
98
|
$res = http_post($url,json_encode($param));
|
|
|
|
99
|
+ echo date('Y-m-d H:i:s') . '开始:'.json_encode($res) . PHP_EOL;
|
|
98
|
if(!empty($res) && $res['code'] == 200){
|
100
|
if(!empty($res) && $res['code'] == 200){
|
|
99
|
$saveData = [
|
101
|
$saveData = [
|
|
100
|
'project_id'=>$project_id,
|
102
|
'project_id'=>$project_id,
|