|
...
|
...
|
@@ -66,6 +66,7 @@ class AdsController extends BaseController |
|
|
|
}
|
|
|
|
$result = $result->toArray();
|
|
|
|
$result['relay_site_total'] = $relay_site_total;
|
|
|
|
$result['default_ai_param'] = ReInquiryTask::DEFAULT_AI_PARAM;
|
|
|
|
|
|
|
|
return $this->response('success', Code::SUCCESS, $result);
|
|
|
|
}
|
|
...
|
...
|
@@ -86,10 +87,26 @@ class AdsController extends BaseController |
|
|
|
$num = intval($request->input('num'));
|
|
|
|
$status = intval($request->input('status'));
|
|
|
|
$is_replace_text = intval($request->input('is_replace_text'));
|
|
|
|
$ai_param = $request->input('ai_param');
|
|
|
|
if (empty($title) || empty($ad_id))
|
|
|
|
return $this->response('请填写完整信息!', Code::USER_ERROR, []);
|
|
|
|
|
|
|
|
ReInquiryTask::createTask($id, $title, $industry, $ad_id, $ad_url, $ad_img, $num, $status, $is_replace_text);
|
|
|
|
//AI生成
|
|
|
|
if($is_replace_text == 2){
|
|
|
|
if(empty($ai_param['mkeywords'])){
|
|
|
|
return $this->response('工厂关键词不能为空!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
if(empty($ai_param['characters'])){
|
|
|
|
return $this->response('随机字符数不能为空!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
if(empty($ai_param['inkeywords'])){
|
|
|
|
return $this->response('询盘内容关键词不能为空!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
if(empty($ai_param['suoxie'])){
|
|
|
|
return $this->response('英文缩写参考不能为空!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ReInquiryTask::createTask($id, $title, $industry, $ad_id, $ad_url, $ad_img, $num, $status, $is_replace_text, $ai_param);
|
|
|
|
return $this->response('success', Code::SUCCESS, []);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|