main
fengxinyhyl 4 months ago
parent a5180d9fb4
commit 0dc6d22f2d
  1. 3
      app/common/dao/store/product/SpuDao.php
  2. 1
      app/controller/admin/system/merchant/MerchantType.php
  3. 1
      app/controller/api/store/product/StoreSpu.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);

@ -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) {

@ -57,6 +57,7 @@ class StoreSpu extends BaseController
'is_trader',
'product_ids',
'mer_id',
'is_hot',
'filter_params',
'mer_type_id'
]);

Loading…
Cancel
Save