正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
| @@ -195,6 +195,13 @@ class ProductController extends BaseController | @@ -195,6 +195,13 @@ class ProductController extends BaseController | ||
| 195 | $this->map['title'] = str_replace('+',' ',$this->map['title']); | 195 | $this->map['title'] = str_replace('+',' ',$this->map['title']); |
| 196 | $query = $query->where('title','like','%'.$this->map['title'].'%'); | 196 | $query = $query->where('title','like','%'.$this->map['title'].'%'); |
| 197 | } | 197 | } |
| 198 | + if(isset($this->map['keyword_title']) && !empty($this->map['keyword_title'])){ | ||
| 199 | + $keywordModel = new Keyword(); | ||
| 200 | + $keywordInfo = $keywordModel->read(['title'=>$this->map['keyword_title']],['id']); | ||
| 201 | + if(!empty($keywordInfo)){ | ||
| 202 | + $query = $query->where('keyword_id','like','%,'.$keywordInfo['id'].',%'); | ||
| 203 | + } | ||
| 204 | + } | ||
| 198 | if(isset($this->map['status'])){ | 205 | if(isset($this->map['status'])){ |
| 199 | if($this->map['status'] == 0){ | 206 | if($this->map['status'] == 0){ |
| 200 | $query = $query->whereIn('status',[0,3]); | 207 | $query = $query->whereIn('status',[0,3]); |
-
请 注册 或 登录 后发表评论