|
...
|
...
|
@@ -267,13 +267,13 @@ class InquiryForwardLogic extends BaseLogic |
|
|
|
{
|
|
|
|
|
|
|
|
$model = new InquiryProjectRoute();
|
|
|
|
// if ($type == 1) {
|
|
|
|
// //使用全文索引搜索
|
|
|
|
// $routeQuery = $model->select(['project_id', 'route'])->whereRaw("MATCH(title) AGAINST(? IN BOOLEAN MODE)", [$keywords]);
|
|
|
|
// } else {
|
|
|
|
if ($type == 1) {
|
|
|
|
//使用全文索引搜索
|
|
|
|
$routeQuery = $model->select(['project_id', 'route'])->whereRaw("MATCH(title) AGAINST(? IN BOOLEAN MODE)", [$keywords]);
|
|
|
|
} else {
|
|
|
|
//使用like查询
|
|
|
|
$routeQuery = $model->select(['project_id', 'route'])->where('title', 'like', '%' . $keywords . '%');
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
$re_route = $routeQuery->inRandomOrder()->take(100)->get()->toArray();
|
|
|
|
|
...
|
...
|
|