作者 lyh

gxgeo设置搜索历史记录

... ... @@ -47,12 +47,15 @@ class GeoQuestionResLogic extends BaseLogic
* @time :2025/7/4 9:48
*/
public function getResultList($map = [],$page = 1,$row = 20){
$map['project_id'] = $this->user['project_id'];
$filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at'];
if(!empty($map['created_at'])){
$map['project_id'] = $this->user['project_id'];
$map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].' 23:59:59']];
$this->model = new GeoQuestionLog();
}
if(!empty($map['keywords'])){
$map['keywords'] = ['like','%'.$map['keywords'].'%'];
}
$query = $this->model->formatQuery($map);
$query = $query->where(function ($q) {
$q->whereRaw('JSON_LENGTH(keywords) > 0')
... ...