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