|
...
|
...
|
@@ -407,7 +407,11 @@ class PrivateController extends BaseController |
|
|
|
$num = count($keywords_arr);
|
|
|
|
if($num >= 50){
|
|
|
|
$list = $productKeywordModel::orderByRaw('LENGTH(title) ASC')->whereIn('title',$keywords_arr)->limit(50)->pluck('title', 'route')->toArray();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
$list_num = count($list);
|
|
|
|
if($list_num < 50){
|
|
|
|
$key_list = $productKeywordModel::orderByRaw('LENGTH(title) ASC')->limit(50 - $list_num)->pluck('title','route')->toArray();
|
|
|
|
}
|
|
|
|
$list = array_merge($key_list,$list);
|
|
|
|
}else{
|
|
|
|
$list = $productKeywordModel::orderByRaw('LENGTH(title) ASC')->whereIn('title',$keywords_arr)->pluck('title', 'route')->toArray();
|
|
|
|
$key_list = $productKeywordModel::orderByRaw('LENGTH(title) ASC')->limit(50 - $num)->pluck('title','route')->toArray();
|
...
|
...
|
|