|
@@ -17,6 +17,7 @@ import com.github.zuihou.database.mybatis.auth.DataScope;
|
|
|
import com.github.zuihou.database.mybatis.conditions.Wraps;
|
|
|
import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -50,8 +51,10 @@ public class CouponServiceImpl extends SuperServiceImpl<CouponMapper, Coupon> im
|
|
|
@Override
|
|
|
public IPage<Coupon> selcetPage(PageParams<CouponPageDTO> pageParams) {
|
|
|
Page<Coupon> page = new Page<>(pageParams.getCurrent(), pageParams.getSize());
|
|
|
- // 设置优惠券状态查询默认值, -1 -> 查询所有状态
|
|
|
- pageParams.getModel().setStatus("-1");
|
|
|
+ if (StringUtils.isBlank(pageParams.getModel().getStatus())) {
|
|
|
+ // 设置优惠券状态查询默认值, -1 -> 查询所有状态
|
|
|
+ pageParams.getModel().setStatus("-1");
|
|
|
+ }
|
|
|
return baseMapper.selcetPage(page, pageParams.getModel(), new DataScope());
|
|
|
}
|
|
|
|