|
...
|
...
|
@@ -44,7 +44,18 @@ class GeoQuestionResLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function getResultList($map = [],$page = 1,$row = 20,$order = 'id'){
|
|
|
|
$filed = ['id','project_id','question_id','platform','question','keywords','url','created_at','updated_at'];
|
|
|
|
$data = $this->model->lists($map,$page,$row,$order,$filed);
|
|
|
|
$result = GeoQuestionResult::select($filed)
|
|
|
|
->where($map)
|
|
|
|
->where(function($query) {
|
|
|
|
$query->where('keywords', '!=', '[]')
|
|
|
|
->orWhere('url', '!=', '[]');
|
|
|
|
})
|
|
|
|
->orderByRaw('LENGTH(question) ASC')
|
|
|
|
->paginate($row, $filed, 'page', $page);
|
|
|
|
$data = empty($result) ? [] : $result->toArray();
|
|
|
|
|
|
|
|
// $filed = ['id','project_id','question_id','platform','question','keywords','url','created_at','updated_at'];
|
|
|
|
// $data = $this->model->lists($map,$page,$row,$order,$filed);
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|