|
|
@ -187,6 +187,9 @@ class SpuDao extends BaseDao |
|
|
|
$query->where('S.ot_price','between',$scope); |
|
|
|
$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) { |
|
|
|
->when(isset($where['hot_type']) && $where['hot_type'] !== '', function ($query) use ($where) { |
|
|
|
if ($where['hot_type'] == 'new') $query->where('P.is_new', 1); |
|
|
|
if ($where['hot_type'] == 'new') $query->where('P.is_new', 1); |
|
|
|
else if ($where['hot_type'] == 'hot') $query->where('P.is_hot', 1); |
|
|
|
else if ($where['hot_type'] == 'hot') $query->where('P.is_hot', 1); |
|
|
|