作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into lyh-server

@@ -117,6 +117,7 @@ class AdsController extends BaseController @@ -117,6 +117,7 @@ class AdsController extends BaseController
117 $ad_url = trim($request->input('ad_url')); 117 $ad_url = trim($request->input('ad_url'));
118 $ad_img = trim($request->input('ad_img')); 118 $ad_img = trim($request->input('ad_img'));
119 $num = intval($request->input('num')); 119 $num = intval($request->input('num'));
  120 + $is_show_fb_source = intval($request->input('is_show_fb_source'));
120 $status = intval($request->input('status')); 121 $status = intval($request->input('status'));
121 $is_replace_text = intval($request->input('is_replace_text')); 122 $is_replace_text = intval($request->input('is_replace_text'));
122 $ai_param = $request->input('ai_param'); 123 $ai_param = $request->input('ai_param');
@@ -138,7 +139,19 @@ class AdsController extends BaseController @@ -138,7 +139,19 @@ class AdsController extends BaseController
138 return $this->response('英文缩写参考不能为空!', Code::USER_ERROR, []); 139 return $this->response('英文缩写参考不能为空!', Code::USER_ERROR, []);
139 } 140 }
140 } 141 }
141 - ReInquiryTask::createTask($id, $title, $industry, $ad_id, $ad_url, $ad_img, $num, $status, $is_replace_text, $ai_param); 142 + $task = ReInquiryTask::createTask($id, $title, $industry, $ad_id, $ad_url, $ad_img, $num, $status, $is_replace_text, $ai_param, $is_show_fb_source);
  143 +
  144 + //是否显示FB标识
  145 + foreach ($task['target'] as $target){
  146 + if($target['is_v6']){
  147 + $project = Project::getProjectByDomain($target['url']);
  148 + if($project){
  149 + $project->is_show_fb_source = $is_show_fb_source;
  150 + $project->save();
  151 + }
  152 + }
  153 + }
  154 +
142 return $this->response('success', Code::SUCCESS, []); 155 return $this->response('success', Code::SUCCESS, []);
143 } 156 }
144 157
@@ -183,6 +196,15 @@ class AdsController extends BaseController @@ -183,6 +196,15 @@ class AdsController extends BaseController
183 } 196 }
184 foreach ($target as $v){ 197 foreach ($target as $v){
185 ReInquiryCount::addInquiryNum($id, $v['url'], 0); 198 ReInquiryCount::addInquiryNum($id, $v['url'], 0);
  199 +
  200 + //是否显示FB标识
  201 + if($target['is_v6']){
  202 + $project = Project::getProjectByDomain($target['url']);
  203 + if($project){
  204 + $project->is_show_fb_source = $task->is_show_fb_source;
  205 + $project->save();
  206 + }
  207 + }
186 } 208 }
187 209
188 //商城 210 //商城
@@ -209,6 +231,7 @@ class AdsController extends BaseController @@ -209,6 +231,7 @@ class AdsController extends BaseController
209 $task->shop_site = json_encode($shop_site); 231 $task->shop_site = json_encode($shop_site);
210 $task->fob_pro = json_encode($fob_pro); 232 $task->fob_pro = json_encode($fob_pro);
211 $task->save(); 233 $task->save();
  234 +
212 return $this->response('success', Code::SUCCESS, []); 235 return $this->response('success', Code::SUCCESS, []);
213 } 236 }
214 237
@@ -56,6 +56,7 @@ class InquiryLogic extends BaseLogic @@ -56,6 +56,7 @@ class InquiryLogic extends BaseLogic
56 ]; 56 ];
57 if (!empty($list['status']) && $list['status'] == 200) { 57 if (!empty($list['status']) && $list['status'] == 200) {
58 foreach ($list['data']['data'] as $item) { 58 foreach ($list['data']['data'] as $item) {
  59 + $item['is_fb'] = $project['is_show_fb_source'] && $item['source'] == 5 ? 1 : 0;
59 $data['list'][] = $item; 60 $data['list'][] = $item;
60 } 61 }
61 $data['total'] = $list['data']['total']; 62 $data['total'] = $list['data']['total'];
@@ -41,7 +41,7 @@ class ReInquiryTask extends Base @@ -41,7 +41,7 @@ class ReInquiryTask extends Base
41 * @param int $status 41 * @param int $status
42 * @return ReInquiryTask 42 * @return ReInquiryTask
43 */ 43 */
44 - public static function createTask($id, $title, $industry, $ad_id, $ad_url, $ad_img, $num, $status, $is_replace_text, $ai_param) 44 + public static function createTask($id, $title, $industry, $ad_id, $ad_url, $ad_img, $num, $status, $is_replace_text, $ai_param, $is_show_fb_source)
45 { 45 {
46 $self = self::where(['id' => $id])->first(); 46 $self = self::where(['id' => $id])->first();
47 if (empty($self)) 47 if (empty($self))
@@ -55,6 +55,7 @@ class ReInquiryTask extends Base @@ -55,6 +55,7 @@ class ReInquiryTask extends Base
55 $self->status = $status; 55 $self->status = $status;
56 $self->is_replace_text = $is_replace_text; 56 $self->is_replace_text = $is_replace_text;
57 $self->ai_param = $ai_param; 57 $self->ai_param = $ai_param;
  58 + $self->is_show_fb_source = $is_show_fb_source;
58 $self->save(); 59 $self->save();
59 return $self; 60 return $self;
60 } 61 }