|
...
|
...
|
@@ -7,6 +7,8 @@ use App\Helper\Arr; |
|
|
|
use App\Helper\Common;
|
|
|
|
use App\Http\Controllers\Bside\BaseController;
|
|
|
|
use App\Http\Logic\Bside\User\UserLogic;
|
|
|
|
use App\Jobs\PurchaserJob;
|
|
|
|
use App\Models\Com\Purchaser;
|
|
|
|
use App\Models\CustomModule\CustomModule;
|
|
|
|
use App\Models\Project\DeployBuild;
|
|
|
|
use App\Models\Project\Project;
|
|
...
|
...
|
@@ -334,21 +336,14 @@ class ComController extends BaseController |
|
|
|
* @time :2024/3/4 10:10
|
|
|
|
*/
|
|
|
|
public function recommendedPurchaser(){
|
|
|
|
$this->param['keyword'] = 'led';
|
|
|
|
$url = 'https://beta.hagro.cn/api/company_list';
|
|
|
|
// $url = 'https://admin.hagro.cn/api/company_list';
|
|
|
|
$data = [
|
|
|
|
'prod_desc'=>$this->param['keyword'],
|
|
|
|
'total'=>$this->param['now'] ?? 10,
|
|
|
|
];
|
|
|
|
arsort($data);
|
|
|
|
$token = 'company_list+'.date('Y-m-d').'+'.http_build_query($data);
|
|
|
|
$param = [
|
|
|
|
'prod_desc'=>$this->param['keyword'],
|
|
|
|
'token'=>md5($token),
|
|
|
|
'total'=>$this->param['now'] ?? 10,
|
|
|
|
];
|
|
|
|
$lists = http_post($url,json_encode($param));
|
|
|
|
$this->response('success',Code::SUCCESS,$lists);
|
|
|
|
$data = [];
|
|
|
|
$purchaserModel = new Purchaser();
|
|
|
|
$info = $purchaserModel->read(['project_id'=>$this->user['project_id']]);
|
|
|
|
if($info === false){
|
|
|
|
PurchaserJob::dispatch(['keyword'=>$this->param['keyword'] ?? 'led','row'=>$this->param['row'] ?? 10,'project_id'=>$this->user['project_id']]);
|
|
|
|
}else{
|
|
|
|
$data = json_decode($info['data']);
|
|
|
|
}
|
|
|
|
$this->response('数据生成中',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|