|
...
|
...
|
@@ -107,11 +107,30 @@ class RecommendedSuppliers extends Command |
|
|
|
$purchaserModel = new Purchaser();
|
|
|
|
$purchaserModel->add($saveData);
|
|
|
|
$this->savePurchaserInfo($project_id,$keyword,$res['data']);
|
|
|
|
}else{
|
|
|
|
$title = $this->getKeywords($project_id);
|
|
|
|
$this->savePurchaser($project_id,$title);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :取关键词
|
|
|
|
* @name :getKeywords
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/7/1 18:07
|
|
|
|
*/
|
|
|
|
public function getKeywords($project_id){
|
|
|
|
$info = Keyword::inRandomOrder()->first();
|
|
|
|
$keywordInfo = $this->getPurchaser($info->title,$project_id);
|
|
|
|
if($keywordInfo !== false){
|
|
|
|
$this->getKeywords($project_id);
|
|
|
|
}
|
|
|
|
return $info->title;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存供应商详情
|
|
|
|
* @name :savePurchaserInfo
|
|
|
|
* @author :lyh
|
...
|
...
|
|