|
@@ -47,6 +47,11 @@ class GeoQuestionResLogic extends BaseLogic |
|
@@ -47,6 +47,11 @@ class GeoQuestionResLogic extends BaseLogic |
|
47
|
*/
|
47
|
*/
|
|
48
|
public function getResultList($map = [],$page = 1,$row = 20){
|
48
|
public function getResultList($map = [],$page = 1,$row = 20){
|
|
49
|
$filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at'];
|
49
|
$filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at'];
|
|
|
|
50
|
+ if(!empty($map['created_at'])){
|
|
|
|
51
|
+ $map['project_id'] = $this->user['project_id'];
|
|
|
|
52
|
+ $map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].'23:59:59']];
|
|
|
|
53
|
+ $this->model = new GeoQuestionLog();
|
|
|
|
54
|
+ }
|
|
50
|
$query = $this->model->formatQuery($map);
|
55
|
$query = $this->model->formatQuery($map);
|
|
51
|
$query = $query->where(function ($q) {
|
56
|
$query = $query->where(function ($q) {
|
|
52
|
$q->whereRaw('JSON_LENGTH(keywords) > 0')
|
57
|
$q->whereRaw('JSON_LENGTH(keywords) > 0')
|
|
@@ -136,24 +141,4 @@ class GeoQuestionResLogic extends BaseLogic |
|
@@ -136,24 +141,4 @@ class GeoQuestionResLogic extends BaseLogic |
|
136
|
return $this->success($dates);
|
141
|
return $this->success($dates);
|
|
137
|
}
|
142
|
}
|
|
138
|
|
143
|
|
|
139
|
- /**
|
|
|
|
140
|
- * @remark :获取搜索列表
|
|
|
|
141
|
- * @name :getSearchList
|
|
|
|
142
|
- * @author :lyh
|
|
|
|
143
|
- * @method :post
|
|
|
|
144
|
- * @time :2025/7/21 16:48
|
|
|
|
145
|
- */
|
|
|
|
146
|
- public function getSearchList($map = [],$page = 1,$row = 20){
|
|
|
|
147
|
- $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at'];
|
|
|
|
148
|
- $map['project_id'] = $this->user['project_id'];
|
|
|
|
149
|
- $map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].'23:59:59']];
|
|
|
|
150
|
- $resLogModel = new GeoQuestionLog();
|
|
|
|
151
|
- $query = $resLogModel->formatQuery($map);
|
|
|
|
152
|
- $query = $query->where(function ($q) {
|
|
|
|
153
|
- $q->whereRaw('JSON_LENGTH(keywords) > 0')
|
|
|
|
154
|
- ->orWhereRaw('JSON_LENGTH(url) > 0');
|
|
|
|
155
|
- });
|
|
|
|
156
|
- $data = $query->orderByRaw('CHAR_LENGTH(question) ASC')->paginate($row, $filed, 'page', $page);
|
|
|
|
157
|
- return $this->success($data);
|
|
|
|
158
|
- }
|
|
|
|
159
|
} |
144
|
} |