作者 lyh

gx

@@ -59,20 +59,20 @@ class RecommendedSuppliers extends Command @@ -59,20 +59,20 @@ class RecommendedSuppliers extends Command
59 if(empty($info)){ 59 if(empty($info)){
60 continue; 60 continue;
61 } 61 }
62 - $keywordInfo = $this->getPurchaser($info['title']); 62 + $keywordInfo = $this->getPurchaser($info->title,$v['project_id']);
63 if($keywordInfo !== false){ 63 if($keywordInfo !== false){
64 continue; 64 continue;
65 } 65 }
66 echo date('Y-m-d H:i:s') . '开始:'.$v['project_id'] . PHP_EOL; 66 echo date('Y-m-d H:i:s') . '开始:'.$v['project_id'] . PHP_EOL;
67 - $this->savePurchaser($v['id'],$info['title']); 67 + $this->savePurchaser($v['project_id'],$info->title);
68 DB::disconnect('custom_mysql'); 68 DB::disconnect('custom_mysql');
69 } 69 }
70 return true; 70 return true;
71 } 71 }
72 72
73 - public function getPurchaser($keyword){ 73 + public function getPurchaser($keyword,$project_id){
74 $purchaserModel = new Purchaser(); 74 $purchaserModel = new Purchaser();
75 - return $purchaserModel->read(['keyword'=>$keyword]); 75 + return $purchaserModel->read(['keyword'=>$keyword,'project_id'=>$project_id]);
76 } 76 }
77 77
78 /** 78 /**