作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !2725
... ... @@ -46,7 +46,7 @@ class GeoQuestionResLogic extends BaseLogic
* @method :post
* @time :2025/7/4 9:48
*/
public function getResultList($map = [],$page = 1,$row = 20,$order = 'created_at',$sort){
public function getResultList($map = [],$page = 1,$row = 20,$order = 'created_at',$sort = 'desc'){
unset($map['sort']);
$map['project_id'] = $this->user['project_id'];
$filed = ['id','project_id','question_id','platform','is_match','question','en_question','keywords','url','label','cosine','created_at','updated_at'];
... ... @@ -65,7 +65,7 @@ class GeoQuestionResLogic extends BaseLogic
// $q->whereRaw('JSON_LENGTH(keywords) > 0')
// ->orWhereRaw('JSON_LENGTH(url) > 0');
// });
$data = $query->orderByRaw('CHAR_LENGTH(question) ASC')->orderBy($order,$sort)->paginate($row, $filed, 'page', $page);;
$data = $query->orderBy($order,$sort)->orderByRaw('CHAR_LENGTH(question) ASC')->paginate($row, $filed, 'page', $page);
return $this->success($data);
}
... ...