作者 lyh

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

@@ -47,6 +47,27 @@ class PostInquiryForward extends Command @@ -47,6 +47,27 @@ class PostInquiryForward extends Command
47 parent::__construct(); 47 parent::__construct();
48 } 48 }
49 49
  50 + /**
  51 + * 芯片网站
  52 + * @var array
  53 + */
  54 + protected $xp_websites = [
  55 + 'www.shinecomponents.com',
  56 + 'www.hk-allchips.com',
  57 + 'www.xinjiada-ic.com',
  58 + 'www.sic-components.com',
  59 + 'www.chip1-vip.com',
  60 + 'www.flash-turtle.com',
  61 + 'www.xinteerchip.com',
  62 + 'www.conevoelec.com'
  63 + ];
  64 +
  65 + /**
  66 + * 5.0询盘转发到自己站点的网站
  67 + * @var array
  68 + */
  69 + protected $self_websites = [205570, 64532, 150535, 292114, 124579, 237114, 194809, 278184, 166223, 366238, 277923, 297045, 309218, 75191, 57616];
  70 +
50 71
51 public function handle() 72 public function handle()
52 { 73 {
@@ -129,21 +150,23 @@ class PostInquiryForward extends Command @@ -129,21 +150,23 @@ class PostInquiryForward extends Command
129 'referrer_url' => $detail['referrer'], 150 'referrer_url' => $detail['referrer'],
130 'user_agent' => $detail['user_agent'], 151 'user_agent' => $detail['user_agent'],
131 ]; 152 ];
132 - $res = Http::withoutVerifying()->timeout(30)->post($website . 'api/traffic_visit/', $data)->json(); 153 + $url = $website . 'api/traffic_visit/';
  154 + $res = Http::withoutVerifying()->timeout(30)->post($url, $data)->json();
133 if (empty($res['status']) || $res['status'] != 200) { 155 if (empty($res['status']) || $res['status'] != 200) {
134 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 156 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
135 $log->remark = mb_substr($res['message'] ?? '', 0, 200); 157 $log->remark = mb_substr($res['message'] ?? '', 0, 200);
136 $log->save(); 158 $log->save();
137 159
138 - Log::channel('inquiry_forward')->error('post_inquiry_forward visit error', [$res, $website . 'api/traffic_visit/', $data]); 160 + Log::channel('inquiry_forward')->error('post_inquiry_forward visit error', [$res, $url, $data]);
139 return false; 161 return false;
140 } 162 }
  163 + Log::channel('inquiry_forward')->error('post_inquiry_forward visit success', [$res, $url, $data]);
141 } else { 164 } else {
142 //v4 v5分离项目 往测试链接推 165 //v4 v5分离项目 往测试链接推
143 $project_info = InquiryProject::select(['is_split', 'test_domain'])->where('domain', 'like', '%' . $detail['website'] . '%')->first(); 166 $project_info = InquiryProject::select(['is_split', 'test_domain'])->where('domain', 'like', '%' . $detail['website'] . '%')->first();
144 if (!$project_info) { 167 if (!$project_info) {
145 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 168 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
146 - $log->remark = '获取域名对应项目失败'; 169 + $log->remark = '获取分离项目测试域名失败';
147 $log->save(); 170 $log->save();
148 171
149 return false; 172 return false;
@@ -161,16 +184,19 @@ class PostInquiryForward extends Command @@ -161,16 +184,19 @@ class PostInquiryForward extends Command
161 'user_agent' => $detail['user_agent'], 184 'user_agent' => $detail['user_agent'],
162 "ip" => $detail['ip'], 185 "ip" => $detail['ip'],
163 ]; 186 ];
164 - $res = Http::get($website . 'wp-admin/admin-ajax.php', $data); 187 + $url = $website . 'wp-admin/admin-ajax.php';
  188 + $res = Http::withoutVerifying()->timeout(30)->get($url, $data);
165 $status = $res->status(); 189 $status = $res->status();
166 if ($status != 200) { 190 if ($status != 200) {
167 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 191 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
168 $log->remark = mb_substr($res->body() ?? '', 0, 200); 192 $log->remark = mb_substr($res->body() ?? '', 0, 200);
169 $log->save(); 193 $log->save();
170 194
171 - Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 visit error', [$res->body(), $website . 'wp-admin/admin-ajax.php', $data]); 195 + Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 visit error', [$res->body(), $url, $data]);
172 return false; 196 return false;
173 } 197 }
  198 +
  199 + Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 visit success', [$res->body(), $url, $data]);
174 } 200 }
175 $log->status = InquiryRelayDetailLog::STATUS_SUCCESS; 201 $log->status = InquiryRelayDetailLog::STATUS_SUCCESS;
176 $log->save(); 202 $log->save();
@@ -179,12 +205,18 @@ class PostInquiryForward extends Command @@ -179,12 +205,18 @@ class PostInquiryForward extends Command
179 205
180 public function inquiry(InquiryRelayDetail $detail, InquiryRelayDetailLog $log) 206 public function inquiry(InquiryRelayDetail $detail, InquiryRelayDetailLog $log)
181 { 207 {
182 - // v6 208 + if (in_array($detail['website'], $this->xp_websites)) {
  209 + // 芯片网站
  210 + $res = $this->xpInquiry($detail, $log);
  211 + } else {
183 if ($detail['is_v6']) { 212 if ($detail['is_v6']) {
  213 + // v6
184 $res = $this->v6Inquiry($detail, $log); 214 $res = $this->v6Inquiry($detail, $log);
185 } else { 215 } else {
  216 + // v5
186 $res = $this->v5Inquiry($detail, $log); 217 $res = $this->v5Inquiry($detail, $log);
187 } 218 }
  219 + }
188 220
189 if (!$res) { 221 if (!$res) {
190 return false; 222 return false;
@@ -196,6 +228,47 @@ class PostInquiryForward extends Command @@ -196,6 +228,47 @@ class PostInquiryForward extends Command
196 return true; 228 return true;
197 } 229 }
198 230
  231 + public function xpInquiry($detail, $log)
  232 + {
  233 + $data = [
  234 + 'refer' => $log['url'],
  235 + 'contact_name' => $detail['name'],
  236 + 'email' => $detail['email'],
  237 + 'tel' => $detail['phone'],
  238 + 'ip' => $detail['ip'],
  239 + 'remark' => $detail['message'],
  240 + 'submit_time' => date('Y-m-d H:i:s', time() + 20),
  241 + ];
  242 + $url = 'https://' . $detail['website'] . '/api/store/webmail?flag=opencart';
  243 + $post_data = json_encode($data);
  244 + $curl = curl_init($url);
  245 + curl_setopt($curl, CURLOPT_POST, 1);
  246 + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  247 + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
  248 + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
  249 + curl_setopt($curl, CURLOPT_AUTOREFERER, 1);
  250 + curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36');
  251 + curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
  252 + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);
  253 + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  254 + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
  255 + curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8', 'Content-Length: ' . strlen($post_data)));
  256 + $curl_response = curl_exec($curl);
  257 + curl_close($curl);
  258 +
  259 + $res = json_decode($curl_response, true);
  260 + if (empty($res['code']) || $res['code'] != 200) {
  261 + $log->status = InquiryRelayDetailLog::STATUS_FAIL;
  262 + $log->remark = mb_substr($res['msg'] ?? '', 0, 200);
  263 + $log->save();
  264 + Log::channel('inquiry_forward')->error('post_inquiry_forward xp inquiry error', [$res, $url, $data]);
  265 + return false;
  266 + }
  267 + Log::channel('inquiry_forward')->error('post_inquiry_forward xp inquiry success', [$res, $url, $data]);
  268 +
  269 + return false;
  270 + }
  271 +
199 public function v6Inquiry($detail, $log) 272 public function v6Inquiry($detail, $log)
200 { 273 {
201 $website = 'https://' . $detail['website'] . '/'; 274 $website = 'https://' . $detail['website'] . '/';
@@ -211,19 +284,46 @@ class PostInquiryForward extends Command @@ -211,19 +284,46 @@ class PostInquiryForward extends Command
211 } else { 284 } else {
212 $data['__amp_source_origin'] = trim($website, '/'); 285 $data['__amp_source_origin'] = trim($website, '/');
213 } 286 }
214 - $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($website . 'api/inquiryQd?source=5', $data)->json(); 287 + $url = $website . 'api/inquiryQd?source=5';
  288 + $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
215 if (empty($res['code']) || $res['code'] != 200) { 289 if (empty($res['code']) || $res['code'] != 200) {
216 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 290 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
217 $log->remark = mb_substr($res['message'] ?? '', 0, 200); 291 $log->remark = mb_substr($res['message'] ?? '', 0, 200);
218 $log->save(); 292 $log->save();
219 - Log::channel('inquiry_forward')->error('post_inquiry_forward v6 inquiry error', [$res, $website . 'api/inquiryQd/', $data]); 293 + Log::channel('inquiry_forward')->error('post_inquiry_forward v6 inquiry error', [$res, $url, $data]);
220 return false; 294 return false;
221 } 295 }
  296 + Log::channel('inquiry_forward')->error('post_inquiry_forward v6 inquiry success', [$res, $url, $data]);
222 return true; 297 return true;
223 } 298 }
224 299
225 public function v5Inquiry($detail, $log) 300 public function v5Inquiry($detail, $log)
226 { 301 {
  302 + $project_id = InquiryProject::where('version', '<', 6)->where('domain', 'like', '%' . $detail['website'] . '%')->value('primary_id') ?? 0;
  303 + if (in_array($project_id, $this->self_websites)) {
  304 + //发送到自己站点项目
  305 + $data = [
  306 + 'Name' => $detail['name'],
  307 + 'Phone' => $detail['phone'],
  308 + 'Message' => $detail['message'],
  309 + 'Email' => $detail['email'],
  310 + 'submit_ip' => $detail['ip'],
  311 + 'refer' => $log['url'],
  312 + 'submit_time' => date('Y-m-d H:i:s', time() + 60)
  313 + ];
  314 + $url = 'https://' . $detail['website'] . '/wp-admin/admin-ajax.php?action=live_remort_receive';
  315 + $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data);
  316 + $status = $res->status();
  317 + if ($status != 200) {
  318 + $log->status = InquiryRelayDetailLog::STATUS_FAIL;
  319 + $log->remark = mb_substr($res->body() ?? '', 0, 200);
  320 + $log->save();
  321 +
  322 + Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 inquiry error', [$res->body(), $url, $data]);
  323 + return false;
  324 + }
  325 + Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 inquiry success', [$res->body(), $url, $data]);
  326 + } else {
227 $data = [ 327 $data = [
228 'name' => $detail['name'], 328 'name' => $detail['name'],
229 'phone' => $detail['phone'], 329 'phone' => $detail['phone'],
@@ -235,21 +335,19 @@ class PostInquiryForward extends Command @@ -235,21 +335,19 @@ class PostInquiryForward extends Command
235 'submit_time' => date('Y-m-d H:i:s'), 335 'submit_time' => date('Y-m-d H:i:s'),
236 'source' => 5, 336 'source' => 5,
237 ]; 337 ];
238 - $result = Http::withoutVerifying()->timeout(30)->post('https://www.globalso.site/api/external-interface/add/fa043f9cbec6b38f', $data);  
239 - $res['data'][0]['status'] = 'success';  
240 - //兼容接口返回格式  
241 - if (!empty($res['data'][0]['status'])) {  
242 - $res['data'][0]['code'] = $res['data'][0]['status'] == 'success' ? 200 : 400;  
243 - !empty($res['data'][0]['msg']) && $res['message'] = $res['data'][0]['msg'];  
244 - }  
245 - if (empty($res['data'][0]['code']) || !in_array($res['data'][0]['code'], [200, 300])) { 338 + $url = 'https://www.globalso.site/api/external-interface/add/fa043f9cbec6b38f';
  339 + $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
  340 + if (empty($res['status']) || $res['status'] != 200) {
246 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 341 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
247 $log->remark = mb_substr($res['message'] ?? '', 0, 200); 342 $log->remark = mb_substr($res['message'] ?? '', 0, 200);
248 $log->save(); 343 $log->save();
249 344
250 - Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 inquiry error', [$result->body(), 'https://www.globalso.site/api/external-interface/add/fa043f9cbec6b38f', $data]); 345 + Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 inquiry error', [$res, $url, $data]);
251 return false; 346 return false;
252 } 347 }
  348 + Log::channel('inquiry_forward')->error('post_inquiry_forward v4|v5 inquiry success', [$res, $url, $data]);
  349 + }
  350 +
253 return true; 351 return true;
254 } 352 }
255 353
@@ -153,6 +153,20 @@ class RelayInquiryForward extends Command @@ -153,6 +153,20 @@ class RelayInquiryForward extends Command
153 153
154 protected $otherzb = [700, 300]; //模拟访问来源占比 (非美国) google.com|google.其他后缀 154 protected $otherzb = [700, 300]; //模拟访问来源占比 (非美国) google.com|google.其他后缀
155 155
  156 + /**
  157 + * 芯片网站
  158 + * @var array
  159 + */
  160 + protected $xp_websites = [
  161 + 'www.shinecomponents.com',
  162 + 'www.hk-allchips.com',
  163 + 'www.xinjiada-ic.com',
  164 + 'www.sic-components.com',
  165 + 'www.chip1-vip.com',
  166 + 'www.flash-turtle.com',
  167 + 'www.xinteerchip.com',
  168 + 'www.conevoelec.com'
  169 + ];
156 170
157 public function handle() 171 public function handle()
158 { 172 {
@@ -207,9 +221,14 @@ class RelayInquiryForward extends Command @@ -207,9 +221,14 @@ class RelayInquiryForward extends Command
207 public function completeDetail($inquiry_detail) 221 public function completeDetail($inquiry_detail)
208 { 222 {
209 //visit urls 223 //visit urls
210 - $visit_urls = $this->getUrls($inquiry_detail['is_v6'], $inquiry_detail['website'], $inquiry_detail['email']);  
211 $inquiry_url = json_decode($inquiry_detail['urls'], true); 224 $inquiry_url = json_decode($inquiry_detail['urls'], true);
  225 + if (in_array($inquiry_detail['website'], $this->xp_websites)) {
  226 + //芯片网站无需模拟访问,直接发送询盘
  227 + $urls = $inquiry_url;
  228 + } else {
  229 + $visit_urls = $this->getUrls($inquiry_detail['is_v6'], $inquiry_detail['website'], $inquiry_detail['email']);
212 $urls = array_merge($visit_urls, $inquiry_url); 230 $urls = array_merge($visit_urls, $inquiry_url);
  231 + }
213 232
214 //lang 233 //lang
215 if (is_numeric($inquiry_detail['message'])) { //数字会被识别为中文 234 if (is_numeric($inquiry_detail['message'])) { //数字会被识别为中文
@@ -303,8 +322,8 @@ class RelayInquiryForward extends Command @@ -303,8 +322,8 @@ class RelayInquiryForward extends Command
303 $all_urls = array_merge($urls, $product_url, $product_cate_url, $keywords_url, $page_url); 322 $all_urls = array_merge($urls, $product_url, $product_cate_url, $keywords_url, $page_url);
304 323
305 if (count($all_urls) > 1) { 324 if (count($all_urls) > 1) {
306 - // 随机访问1-6个页面  
307 - $deep = rand(1, 6); 325 + // 随机访问1-5个页面
  326 + $deep = rand(1, 5);
308 $visit_urls = Arr::random($all_urls, $deep > count($all_urls) ? count($all_urls) : $deep); 327 $visit_urls = Arr::random($all_urls, $deep > count($all_urls) ? count($all_urls) : $deep);
309 $urls = array_merge($urls, $visit_urls); 328 $urls = array_merge($urls, $visit_urls);
310 } 329 }
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 namespace App\Console\Commands\Inquiry; 9 namespace App\Console\Commands\Inquiry;
10 10
11 use App\Helper\Translate; 11 use App\Helper\Translate;
  12 +use App\Helper\Validate;
12 use App\Models\Inquiry\InquiryInfo; 13 use App\Models\Inquiry\InquiryInfo;
13 use App\Services\InquiryRelayService; 14 use App\Services\InquiryRelayService;
14 use Illuminate\Console\Command; 15 use Illuminate\Console\Command;
@@ -64,6 +65,9 @@ class SyncInquiryRelay extends Command @@ -64,6 +65,9 @@ class SyncInquiryRelay extends Command
64 //+86区号过滤 65 //+86区号过滤
65 continue; 66 continue;
66 } 67 }
  68 + if (strpos($item['refer'], 'findsupply.com') !== false) {
  69 + $item['source_type'] = InquiryInfo::TYPE_FIND_SUPPLY;
  70 + }
67 $this->saveDate($item, $item['source_type']); 71 $this->saveDate($item, $item['source_type']);
68 } 72 }
69 } 73 }
@@ -164,7 +168,20 @@ class SyncInquiryRelay extends Command @@ -164,7 +168,20 @@ class SyncInquiryRelay extends Command
164 $data['image'] = ''; 168 $data['image'] = '';
165 } 169 }
166 170
167 - $model->createInquiry($data['name'], $data['phone'], $data['email'], $data['ip'], $country, $data['message'], $message_cn, $type, $data['time'], $data['refer'], $data['title'], $keywords, $message_sign, $data['origin_key'], $data['image']); 171 + //判断手机和邮箱是否有效
  172 + $email_status = 0;
  173 + if ($data['email']) {
  174 + $check_email = Validate::email($data['email']);
  175 + $email_status = $check_email ? 1 : 0;
  176 + }
  177 + $phone_status = 0;
  178 + if ($data['phone']) {
  179 + $num_phone = preg_replace('/\D/', '', $data['phone']) ?? ''; // \D 匹配所有非数字字符
  180 + $check_phone = Validate::phone($num_phone);
  181 + $phone_status = $check_phone ? 1 : 0;
  182 + }
  183 +
  184 + $model->createInquiry($data['name'], $data['phone'], $data['email'], $data['ip'], $country, $data['message'], $message_cn, $type, $data['time'], $data['refer'], $data['title'], $keywords, $message_sign, $data['origin_key'], $data['image'], $email_status, $phone_status);
168 return true; 185 return true;
169 } 186 }
170 187
@@ -28,6 +28,9 @@ class InquiryForwardController extends BaseController @@ -28,6 +28,9 @@ class InquiryForwardController extends BaseController
28 if (isset($this->param['url_keyword'])) { 28 if (isset($this->param['url_keyword'])) {
29 $this->map['url_keyword'] = ['like', '%' . $this->map['url_keyword'] . '%']; 29 $this->map['url_keyword'] = ['like', '%' . $this->map['url_keyword'] . '%'];
30 } 30 }
  31 + if (isset($this->param['message'])) {
  32 + $this->map['message'] = ['like', '%' . $this->map['message'] . '%'];
  33 + }
31 $lists = $inquiryForwardLogic->getInquiryLists($this->map, $this->page, $this->row, $this->order); 34 $lists = $inquiryForwardLogic->getInquiryLists($this->map, $this->page, $this->row, $this->order);
32 $this->response('success', Code::SUCCESS, $lists); 35 $this->response('success', Code::SUCCESS, $lists);
33 } 36 }
@@ -40,14 +43,15 @@ class InquiryForwardController extends BaseController @@ -40,14 +43,15 @@ class InquiryForwardController extends BaseController
40 * @author Akun 43 * @author Akun
41 * @date 2025/03/01 11:21 44 * @date 2025/03/01 11:21
42 */ 45 */
43 - public function getInquiryInfo(InquiryForwardLogic $inquiryForwardLogic){ 46 + public function getInquiryInfo(InquiryForwardLogic $inquiryForwardLogic)
  47 + {
44 $this->request->validate([ 48 $this->request->validate([
45 - 'id'=>'required',  
46 - ],[ 49 + 'id' => 'required',
  50 + ], [
47 'id.required' => 'ID不能为空', 51 'id.required' => 'ID不能为空',
48 ]); 52 ]);
49 $info = $inquiryForwardLogic->infoInquiry(); 53 $info = $inquiryForwardLogic->infoInquiry();
50 - $this->response('success',Code::SUCCESS,$info); 54 + $this->response('success', Code::SUCCESS, $info);
51 } 55 }
52 56
53 /** 57 /**
@@ -190,7 +194,8 @@ class InquiryForwardController extends BaseController @@ -190,7 +194,8 @@ class InquiryForwardController extends BaseController
190 * @author Akun 194 * @author Akun
191 * @date 2025/03/01 9:22 195 * @date 2025/03/01 9:22
192 */ 196 */
193 - public function getInquiryDetailList(InquiryForwardLogic $inquiryForwardLogic){ 197 + public function getInquiryDetailList(InquiryForwardLogic $inquiryForwardLogic)
  198 + {
194 if (isset($this->param['country'])) { 199 if (isset($this->param['country'])) {
195 $this->map['country'] = ['like', '%' . $this->map['country'] . '%']; 200 $this->map['country'] = ['like', '%' . $this->map['country'] . '%'];
196 } 201 }
@@ -14,7 +14,6 @@ use App\Models\Inquiry\InquiryProjectRoute; @@ -14,7 +14,6 @@ use App\Models\Inquiry\InquiryProjectRoute;
14 use App\Models\Inquiry\InquiryRelayDetail; 14 use App\Models\Inquiry\InquiryRelayDetail;
15 use Illuminate\Support\Arr; 15 use Illuminate\Support\Arr;
16 use Illuminate\Support\Facades\DB; 16 use Illuminate\Support\Facades\DB;
17 -use Illuminate\Support\Facades\Log;  
18 use Illuminate\Support\Str; 17 use Illuminate\Support\Str;
19 18
20 /** 19 /**
@@ -333,10 +332,17 @@ class InquiryForwardLogic extends BaseLogic @@ -333,10 +332,17 @@ class InquiryForwardLogic extends BaseLogic
333 */ 332 */
334 public function expiredInquiry() 333 public function expiredInquiry()
335 { 334 {
336 - $rs = $this->model->edit(['status' => InquiryInfo::STATUS_INVALID], ['id' => $this->param['id']]); 335 + if (isset($this->param['type']) && $this->param['type'] == 1) {
  336 + //启用
  337 + $status = InquiryInfo::STATUS_INIT;
  338 + } else {
  339 + //无效
  340 + $status = InquiryInfo::STATUS_INVALID;
  341 + }
  342 + $rs = $this->model->edit(['status' => $status], ['id' => $this->param['id']]);
337 343
338 if ($rs === false) { 344 if ($rs === false) {
339 - $this->fail('设置无效失败'); 345 + $this->fail('设置失败');
340 } 346 }
341 return $this->success(); 347 return $this->success();
342 } 348 }
@@ -37,6 +37,7 @@ class InquiryInfo extends Base @@ -37,6 +37,7 @@ class InquiryInfo extends Base
37 const TYPE_ADS = 2; 37 const TYPE_ADS = 2;
38 const TYPE_AI_SITE_GROUP = 3; 38 const TYPE_AI_SITE_GROUP = 3;
39 const TYPE_SPIDER = 4; 39 const TYPE_SPIDER = 4;
  40 + const TYPE_FIND_SUPPLY = 5;
40 41
41 /** 42 /**
42 * 状态映射 43 * 状态映射
@@ -60,9 +61,10 @@ class InquiryInfo extends Base @@ -60,9 +61,10 @@ class InquiryInfo extends Base
60 { 61 {
61 return [ 62 return [
62 self::TYPE_SITE_GROUP => '站群询盘', 63 self::TYPE_SITE_GROUP => '站群询盘',
63 - self::TYPE_ADS => 'ads采集站询盘',  
64 - self::TYPE_AI_SITE_GROUP => 'AI站群询盘',  
65 - self::TYPE_SPIDER => '蜘蛛询盘', 64 + self::TYPE_ADS => 'ADS采集站',
  65 + self::TYPE_AI_SITE_GROUP => '自建AI站群',
  66 + self::TYPE_SPIDER => 'SC平台',
  67 + self::TYPE_FIND_SUPPLY => 'FS平台',
66 ]; 68 ];
67 } 69 }
68 70
@@ -83,15 +85,19 @@ class InquiryInfo extends Base @@ -83,15 +85,19 @@ class InquiryInfo extends Base
83 * @param $message_sign 85 * @param $message_sign
84 * @param $origin_key 86 * @param $origin_key
85 * @param string $image 87 * @param string $image
  88 + * @param int $email_status
  89 + * @param int $phone_status
86 * @return bool 90 * @return bool
87 */ 91 */
88 - public function createInquiry($name, $phone, $email, $ip, $country, $message, $message_cn, $type, $inquiry_date, $url, $url_title, $url_keyword, $message_sign, $origin_key, $image = '') 92 + public function createInquiry($name, $phone, $email, $ip, $country, $message, $message_cn, $type, $inquiry_date, $url, $url_title, $url_keyword, $message_sign, $origin_key, $image = '', $email_status = 0, $phone_status = 0)
89 { 93 {
90 try { 94 try {
91 $self = new self(); 95 $self = new self();
92 $self->name = $name; 96 $self->name = $name;
93 $self->phone = $phone; 97 $self->phone = $phone;
  98 + $self->phone_status = $phone_status;
94 $self->email = $email; 99 $self->email = $email;
  100 + $self->email_status = $email_status;
95 $self->ip = $ip; 101 $self->ip = $ip;
96 $self->country = $country; 102 $self->country = $country;
97 $self->message = $message; 103 $self->message = $message;
@@ -185,6 +185,12 @@ return [ @@ -185,6 +185,12 @@ return [
185 'level' => 'debug', 185 'level' => 'debug',
186 'days' => 14, 186 'days' => 14,
187 ], 187 ],
  188 + 'inquiry_forward' => [
  189 + 'driver' => 'daily',
  190 + 'path' => storage_path('logs/inquiry_forward/laravel.log'),
  191 + 'level' => 'debug',
  192 + 'days' => 14,
  193 + ],
188 ], 194 ],
189 //操作日志 195 //操作日志
190 'operator_log' =>[ 196 'operator_log' =>[