作者 lyh

gx

@@ -8,7 +8,9 @@ use App\Models\Inquiry\InquiryCount; @@ -8,7 +8,9 @@ use App\Models\Inquiry\InquiryCount;
8 use App\Models\Inquiry\InquiryInfo; 8 use App\Models\Inquiry\InquiryInfo;
9 use App\Models\Inquiry\InquiryIP; 9 use App\Models\Inquiry\InquiryIP;
10 use App\Models\Inquiry\InquiryType; 10 use App\Models\Inquiry\InquiryType;
  11 +use App\Models\Project\DeployOptimize;
11 use App\Models\Project\Keywords; 12 use App\Models\Project\Keywords;
  13 +use App\Models\Project\Project;
12 use Illuminate\Support\Facades\DB; 14 use Illuminate\Support\Facades\DB;
13 15
14 /** 16 /**
@@ -236,20 +238,12 @@ class InquiryInfoLogic extends BaseLogic @@ -236,20 +238,12 @@ class InquiryInfoLogic extends BaseLogic
236 * @time :2023/7/17 9:09 238 * @time :2023/7/17 9:09
237 */ 239 */
238 public function getKeywordUrl($map){ 240 public function getKeywordUrl($map){
239 - $lists = [];  
240 - $keywordModel = new Keywords();  
241 - $list = $keywordModel->select('project_id')  
242 - ->where(['type'=>1])->where('keyword','like','%'.$map['keyword'].'%')->groupBy('project_id')->get();  
243 - if(!empty($list)){  
244 - $data = [];  
245 - $list = $list->toArray();  
246 - foreach ($list as $v){  
247 - $data[] = $v['project_id'];  
248 - }  
249 - //根据项目id获取域名  
250 - $lists = DB::table('gl_project_deploy_build')  
251 - ->select('test_domain')->whereIn('project_id', $data)->get()->toArray();  
252 - } 241 + $deployOptimizeModel = new DeployOptimize();
  242 + $lists = $deployOptimizeModel
  243 + ->where('main_keywords','like','%'.$map['keyword'].'%')
  244 + ->orWhere('customer_keywords','like','%'.$map['keyword'].'%')->groupBy('project_id')->get();
  245 + var_dump($lists);
  246 + die();
253 return $this->success($lists); 247 return $this->success($lists);
254 } 248 }
255 249