|
...
|
...
|
@@ -73,7 +73,7 @@ class ProductController extends BaseController |
|
|
|
* @method :post
|
|
|
|
* @time :2023/9/14 10:01
|
|
|
|
*/
|
|
|
|
public function searchParams(&$query){
|
|
|
|
public function searchParam(&$query){
|
|
|
|
$query = $query->where('project_id',$this->user['project_id']);
|
|
|
|
if (isset($this->map['category_id']) && !empty($this->map['category_id'])) {
|
|
|
|
$str = [];
|
|
...
|
...
|
@@ -84,6 +84,9 @@ class ProductController extends BaseController |
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
if(isset($this->map['title']) && !empty($this->map['title'])){
|
|
|
|
$query = $query->where('title','like','%'.$this->map['title'].'%');
|
|
|
|
}
|
|
|
|
if(!empty($this->map['start_at']) && !empty($this->map['end_at'])){
|
|
|
|
$query->whereBetween('created_at', [$this->map['start_at'],$this->map['end_at']]);
|
|
|
|
}
|
|
...
|
...
|
@@ -91,21 +94,6 @@ class ProductController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :搜索参数处理
|
|
|
|
* @name :searchParam
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/9/14 14:32
|
|
|
|
*/
|
|
|
|
public function searchParam(){
|
|
|
|
if(isset($this->map['title']) && !empty($this->map['title'])){
|
|
|
|
$this->map['title'] = ['like','%'.$this->map['title'].'%'];
|
|
|
|
}
|
|
|
|
$this->map['project_id'] = $this->user['project_id'];
|
|
|
|
return $this->map;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :查看产品是否已装修
|
|
|
|
* @name :getProductIsRenovation
|
|
|
|
* @author :lyh
|
...
|
...
|
|