作者 刘锟

update

@@ -249,13 +249,13 @@ class InquiryForwardLogic extends BaseLogic @@ -249,13 +249,13 @@ class InquiryForwardLogic extends BaseLogic
249 $num = $this->param['num'] ?? 3; 249 $num = $this->param['num'] ?? 3;
250 250
251 $model = new InquiryProjectRoute(); 251 $model = new InquiryProjectRoute();
252 - if ($this->param['type'] == 1) {  
253 - //使用全文索引搜索  
254 - $routeQuery = $model->select(['project_id', 'route'])->whereRaw("MATCH(title) AGAINST(? IN BOOLEAN MODE)", [$this->param['keywords']]);  
255 - } else { 252 +// if ($this->param['type'] == 1) {
  253 +// //使用全文索引搜索
  254 +// $routeQuery = $model->select(['project_id', 'route'])->whereRaw("MATCH(title) AGAINST(? IN BOOLEAN MODE)", [$this->param['keywords']]);
  255 +// } else {
256 //使用like查询 256 //使用like查询
257 $routeQuery = $model->select(['project_id', 'route'])->where('title', 'like', '%' . $this->param['keywords'] . '%'); 257 $routeQuery = $model->select(['project_id', 'route'])->where('title', 'like', '%' . $this->param['keywords'] . '%');
258 - } 258 +// }
259 259
260 $re_route = $routeQuery->inRandomOrder()->take(100)->get()->toArray(); 260 $re_route = $routeQuery->inRandomOrder()->take(100)->get()->toArray();
261 261