作者 lyh

gx

... ... @@ -55,15 +55,15 @@ 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']);
if($keywordInfo !== false){
continue;
}
$this->savePurchaser($v['id'],$keywordInfo['title']);
$this->savePurchaser($v['id'],$info['title']);
DB::disconnect('custom_mysql');
}
return true;
... ...