合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !1882
正在显示
1 个修改的文件
包含
8 行增加
和
8 行删除
| @@ -162,15 +162,15 @@ class RecommendedSuppliers extends Command | @@ -162,15 +162,15 @@ class RecommendedSuppliers extends Command | ||
| 162 | $res = http_post($url,json_encode($param)); | 162 | $res = http_post($url,json_encode($param)); |
| 163 | echo '请求返回状态'. ($res['code']?? '').PHP_EOL; | 163 | echo '请求返回状态'. ($res['code']?? '').PHP_EOL; |
| 164 | // echo date('Y-m-d H:i:s') . json_encode($res) . PHP_EOL; | 164 | // echo date('Y-m-d H:i:s') . json_encode($res) . PHP_EOL; |
| 165 | + //保存多条数据 | ||
| 166 | + $saveData = [ | ||
| 167 | + 'project_id'=>$project_id, | ||
| 168 | + 'keyword'=>$keyword, | ||
| 169 | + 'data'=>json_encode($res['data'] ?? '') | ||
| 170 | + ]; | ||
| 171 | + $purchaserModel = new Purchaser(); | ||
| 172 | + $purchaserModel->add($saveData); | ||
| 165 | if(isset($res['code']) && $res['code'] == 200){ | 173 | if(isset($res['code']) && $res['code'] == 200){ |
| 166 | - //保存多条数据 | ||
| 167 | - $saveData = [ | ||
| 168 | - 'project_id'=>$project_id, | ||
| 169 | - 'keyword'=>$keyword, | ||
| 170 | - 'data'=>json_encode($res['data']) | ||
| 171 | - ]; | ||
| 172 | - $purchaserModel = new Purchaser(); | ||
| 173 | - $purchaserModel->add($saveData); | ||
| 174 | if(!empty($res['data'])){ | 174 | if(!empty($res['data'])){ |
| 175 | $this->savePurchaserInfo($project_id,$keyword,$res['data']); | 175 | $this->savePurchaserInfo($project_id,$keyword,$res['data']); |
| 176 | } | 176 | } |
-
请 注册 或 登录 后发表评论