diff --git a/app/common/dao/store/product/SpuDao.php b/app/common/dao/store/product/SpuDao.php index 6167e97..bd36a8c 100755 --- a/app/common/dao/store/product/SpuDao.php +++ b/app/common/dao/store/product/SpuDao.php @@ -187,6 +187,9 @@ class SpuDao extends BaseDao $query->where('S.ot_price','between',$scope); } }) + ->when(isset($where['is_hot']) && $where['is_hot'] !== '', function ($query) use ($where) { + $query->where('P.is_hot', 1); + }) ->when(isset($where['hot_type']) && $where['hot_type'] !== '', function ($query) use ($where) { if ($where['hot_type'] == 'new') $query->where('P.is_new', 1); else if ($where['hot_type'] == 'hot') $query->where('P.is_hot', 1); diff --git a/app/controller/admin/system/merchant/MerchantType.php b/app/controller/admin/system/merchant/MerchantType.php index 5af3944..549f300 100755 --- a/app/controller/admin/system/merchant/MerchantType.php +++ b/app/controller/admin/system/merchant/MerchantType.php @@ -95,6 +95,7 @@ class MerchantType extends BaseController protected function getValidParams() { $data = $this->request->params(['type_name', 'type_info', 'is_margin', 'margin', 'auth', 'description', 'mark']); + $data['is_margin'] = 0; $validate = app()->make(MerchantTypeValidate::class); $validate->check($data); if ($data['is_margin'] == 1) { diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index 5f16ca4..337d7e7 100755 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -57,6 +57,7 @@ class StoreSpu extends BaseController 'is_trader', 'product_ids', 'mer_id', + 'is_hot', 'filter_params', 'mer_type_id' ]);