|
...
|
...
|
@@ -55,15 +55,16 @@ class RecommendedSuppliers extends Command |
|
|
|
foreach ($project_list as $k => $v){
|
|
|
|
echo date('Y-m-d H:i:s') . 'project_id:'.$v['project_id'] . PHP_EOL;
|
|
|
|
ProjectServer::useProject($v['id']);
|
|
|
|
$keywordInfo = Keyword::inRandomOrder()->first();
|
|
|
|
if(empty($keywordInfo)){
|
|
|
|
$info = Keyword::inRandomOrder()->first();
|
|
|
|
if(empty($info)){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$keywordInfo = $this->getPurchaser($keywordInfo['title']);
|
|
|
|
$keywordInfo = $this->getPurchaser($info['title'] = 'led');
|
|
|
|
if($keywordInfo !== false){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$this->savePurchaser($v['id'],$keywordInfo['title']);
|
|
|
|
echo date('Y-m-d H:i:s') . '开始:'.$v['project_id'] . PHP_EOL;
|
|
|
|
$this->savePurchaser($v['id'],$info['title']);
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
return true;
|
|
...
|
...
|
@@ -95,6 +96,7 @@ class RecommendedSuppliers extends Command |
|
|
|
'total'=>$this->param['row'] ?? 10,
|
|
|
|
];
|
|
|
|
$res = http_post($url,json_encode($param));
|
|
|
|
echo date('Y-m-d H:i:s') . '开始:'.json_encode($res) . PHP_EOL;
|
|
|
|
if(!empty($res) && $res['code'] == 200){
|
|
|
|
$saveData = [
|
|
|
|
'project_id'=>$project_id,
|
...
|
...
|
|