作者 lyh

更新产品

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