|
...
|
...
|
@@ -59,20 +59,20 @@ class RecommendedSuppliers extends Command |
|
|
|
if(empty($info)){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$keywordInfo = $this->getPurchaser($info['title']);
|
|
|
|
$keywordInfo = $this->getPurchaser($info->title,$v['project_id']);
|
|
|
|
if($keywordInfo !== false){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
echo date('Y-m-d H:i:s') . '开始:'.$v['project_id'] . PHP_EOL;
|
|
|
|
$this->savePurchaser($v['id'],$info['title']);
|
|
|
|
$this->savePurchaser($v['project_id'],$info->title);
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPurchaser($keyword){
|
|
|
|
public function getPurchaser($keyword,$project_id){
|
|
|
|
$purchaserModel = new Purchaser();
|
|
|
|
return $purchaserModel->read(['keyword'=>$keyword]);
|
|
|
|
return $purchaserModel->read(['keyword'=>$keyword,'project_id'=>$project_id]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|