作者 李宇航

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

Lyh server



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