|
...
|
...
|
@@ -98,7 +98,7 @@ class AdsController extends BaseController |
|
|
|
$item['cost'] = ReInquiryCost::getCostByAdIds($item['ad_id']);
|
|
|
|
}
|
|
|
|
$result['relay_site_total'] = $relay_site_total;
|
|
|
|
$result['default_ai_param'] = ReInquiryConfig::getDefaultConfigCache();
|
|
|
|
$result['default_ai_param'] = ReInquiryConfig::getDefaultConfigCache(ReInquiryConfig::TYPE_AI_PARAM);
|
|
|
|
|
|
|
|
return $this->response('success', Code::SUCCESS, $result);
|
|
|
|
}
|
|
...
|
...
|
@@ -388,8 +388,9 @@ class AdsController extends BaseController |
|
|
|
* @author zbj
|
|
|
|
* @date 2025/2/12
|
|
|
|
*/
|
|
|
|
public function fbAdsDefaultSet(){
|
|
|
|
$config = ReInquiryConfig::get();
|
|
|
|
public function fbAdsDefaultSet(Request $request){
|
|
|
|
$type = $request->input('type')?: ReInquiryConfig::TYPE_AI_PARAM;
|
|
|
|
$config = ReInquiryConfig::where('type', $type)->get();
|
|
|
|
if($this->request->isMethod('get')){
|
|
|
|
return $this->response('success', Code::SUCCESS, $config);
|
|
|
|
}
|
|
...
|
...
|
@@ -397,7 +398,7 @@ class AdsController extends BaseController |
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
foreach ($config as $item){
|
|
|
|
if(empty($this->param[$item->key])){
|
|
|
|
if($type == ReInquiryConfig::TYPE_AI_PARAM && empty($this->param[$item->key])){
|
|
|
|
throw new \Exception($item->title . '不能为空!');
|
|
|
|
}
|
|
|
|
$item->content = $this->param[$item->key];
|
|
...
|
...
|
@@ -418,7 +419,7 @@ class AdsController extends BaseController |
|
|
|
* @date 2025/2/12
|
|
|
|
*/
|
|
|
|
public function fbAdsSetBatch(){
|
|
|
|
$config = ReInquiryConfig::find($this->param['id']);
|
|
|
|
$config = ReInquiryConfig::where('type', ReInquiryConfig::TYPE_AI_PARAM)->where('id', $this->param['id'])->first();
|
|
|
|
if(!$config){
|
|
|
|
return $this->response('配置不存在', Code::USER_ERROR, []);
|
|
|
|
}
|
...
|
...
|
|