正在显示
1 个修改的文件
包含
11 行增加
和
1 行删除
| @@ -43,7 +43,17 @@ class GeoQuestionResLogic extends BaseLogic | @@ -43,7 +43,17 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 43 | */ | 43 | */ |
| 44 | public function getResultList($map = [],$page = 1,$row = 20,$order = 'id'){ | 44 | public function getResultList($map = [],$page = 1,$row = 20,$order = 'id'){ |
| 45 | $filed = ['id','project_id','question_id','platform','question','keywords','url','created_at','updated_at']; | 45 | $filed = ['id','project_id','question_id','platform','question','keywords','url','created_at','updated_at']; |
| 46 | - $data = $this->model->lists($map,$page,$row,$order,$filed); | 46 | + $result = GeoQuestionResult::select($filed) |
| 47 | + ->where(function($query) { | ||
| 48 | + $query->where('keywords', '!=', '[]') | ||
| 49 | + ->orWhere('url', '!=', '[]'); | ||
| 50 | + }) | ||
| 51 | + ->orderByRaw('LENGTH(question) ASC') | ||
| 52 | + ->get(); | ||
| 53 | + $data = empty($result) ? [] : $result->toArray(); | ||
| 54 | + | ||
| 55 | +// $filed = ['id','project_id','question_id','platform','question','keywords','url','created_at','updated_at']; | ||
| 56 | +// $data = $this->model->lists($map,$page,$row,$order,$filed); | ||
| 47 | return $this->success($data); | 57 | return $this->success($data); |
| 48 | } | 58 | } |
| 49 | 59 |
-
请 注册 或 登录 后发表评论