作者 Your Name
@@ -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 /**
@@ -97,6 +97,7 @@ class RecommendedSuppliers extends Command @@ -97,6 +97,7 @@ class RecommendedSuppliers extends Command
97 'total'=>$this->param['row'] ?? 10, 97 'total'=>$this->param['row'] ?? 10,
98 ]; 98 ];
99 $res = http_post($url,json_encode($param)); 99 $res = http_post($url,json_encode($param));
  100 + echo date('Y-m-d H:i:s') . $res . PHP_EOL;
100 if(!empty($res) && $res['code'] == 200){ 101 if(!empty($res) && $res['code'] == 200){
101 $saveData = [ 102 $saveData = [
102 'project_id'=>$project_id, 103 'project_id'=>$project_id,