作者 lyh

更新产品

... ... @@ -167,6 +167,10 @@ class ProductController extends BaseController
if(!empty($this->param['start_at']) && !empty($this->param['end_at'])){
$query->where('created_at', '>=' ,$this->param['start_at'].' 00:00:00')->where('created_at', '<=' ,$this->param['end_at'].' 59:59:59');
}
$this->param['featured_status'] = $this->param['featured_status'] ?? 0;
if(($this->param['featured_status'] != Category::STATUS_ACTIVE)) {
$query = $query->where('title','not like','Featured%');
}
return $query;
}
... ...
... ... @@ -865,7 +865,7 @@ class ProductLogic extends BaseLogic
$this->param['deleted_at'] = null;
$this->param['featured_status'] = $this->param['featured_status'] ?? 0;
if(($this->param['featured_status'] != Category::STATUS_ACTIVE)) {
$this->param['title'] = ['not like','%Featured%'];
$this->param['title'] = ['not like','Featured%'];
}
unset($this->param['featured_status']);
$list = $categoryModel->list($this->param, ['sort', 'id'], ['id', 'pid', 'title']);
... ...