正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -47,12 +47,15 @@ class GeoQuestionResLogic extends BaseLogic | @@ -47,12 +47,15 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 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){ | 49 | public function getResultList($map = [],$page = 1,$row = 20){ |
| 50 | + $map['project_id'] = $this->user['project_id']; | ||
| 50 | $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at']; | 51 | $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at']; |
| 51 | if(!empty($map['created_at'])){ | 52 | if(!empty($map['created_at'])){ |
| 52 | - $map['project_id'] = $this->user['project_id']; | ||
| 53 | $map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].' 23:59:59']]; | 53 | $map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].' 23:59:59']]; |
| 54 | $this->model = new GeoQuestionLog(); | 54 | $this->model = new GeoQuestionLog(); |
| 55 | } | 55 | } |
| 56 | + if(!empty($map['keywords'])){ | ||
| 57 | + $map['keywords'] = ['like','%'.$map['keywords'].'%']; | ||
| 58 | + } | ||
| 56 | $query = $this->model->formatQuery($map); | 59 | $query = $this->model->formatQuery($map); |
| 57 | $query = $query->where(function ($q) { | 60 | $query = $query->where(function ($q) { |
| 58 | $q->whereRaw('JSON_LENGTH(keywords) > 0') | 61 | $q->whereRaw('JSON_LENGTH(keywords) > 0') |
-
请 注册 或 登录 后发表评论