正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -55,15 +55,15 @@ class RecommendedSuppliers extends Command | @@ -55,15 +55,15 @@ class RecommendedSuppliers extends Command | ||
| 55 | foreach ($project_list as $k => $v){ | 55 | foreach ($project_list as $k => $v){ |
| 56 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['project_id'] . PHP_EOL; | 56 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['project_id'] . PHP_EOL; |
| 57 | ProjectServer::useProject($v['id']); | 57 | ProjectServer::useProject($v['id']); |
| 58 | - $keywordInfo = Keyword::inRandomOrder()->first(); | ||
| 59 | - if(empty($keywordInfo)){ | 58 | + $info = Keyword::inRandomOrder()->first(); |
| 59 | + if(empty($info)){ | ||
| 60 | continue; | 60 | continue; |
| 61 | } | 61 | } |
| 62 | - $keywordInfo = $this->getPurchaser($keywordInfo['title']); | 62 | + $keywordInfo = $this->getPurchaser($info['title']); |
| 63 | if($keywordInfo !== false){ | 63 | if($keywordInfo !== false){ |
| 64 | continue; | 64 | continue; |
| 65 | } | 65 | } |
| 66 | - $this->savePurchaser($v['id'],$keywordInfo['title']); | 66 | + $this->savePurchaser($v['id'],$info['title']); |
| 67 | DB::disconnect('custom_mysql'); | 67 | DB::disconnect('custom_mysql'); |
| 68 | } | 68 | } |
| 69 | return true; | 69 | return true; |
-
请 注册 或 登录 后发表评论