Просмотр исходного кода

[审批][修改][修改渠道卷列表过滤条件]

release_toaliyun_real
luozukai 6 лет назад
Родитель
Сommit
de47b50dfd
2 измененных файлов: 15 добавлений и 5 удалений
  1. +8
    -4
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  2. +7
    -1
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml

+ 8
- 4
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Просмотреть файл

@@ -176,17 +176,21 @@ public class WxCouponController extends BaseController {

WxCoupon coupon = wxCouponService.findById(wxCoupon);
if(coupon!=null){
if(wxCoupon.getValidEndDate()!=null && wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){
return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR);
}
if((wxCoupon.getValidEndDate()!=null&&coupon.getValidEndDate()!=null && DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate()))
&& wxCoupon.getInventory().equals(coupon.getInventory()))
||
(wxCoupon.getValidDays()!=null && coupon.getValidDays()!=null && wxCoupon.getInventory().equals(coupon.getInventory()) &&
wxCoupon.getValidDays().equals(coupon.getValidDays()))
wxCoupon.getValidDays().equals(coupon.getValidDays()))
){
return new ResultData(ErrorCode.COUPON_STOCK_VALID_DATE_SETTING_ERR);
}

if(wxCoupon.getValidEndDate()!=null && wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){
return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR);
}
if(wxCoupon.getValidDays()!=null && coupon.getValidDays()!=null && wxCoupon.getValidDays().intValue() <= coupon.getValidDays().intValue()){
return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR);
}
}

//启动审批流


+ 7
- 1
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Просмотреть файл

@@ -24,7 +24,13 @@
</sql>

<sql id="dynamicWhereConditions">
where cc.status = 0
where 1=1
<if test="null != status ">
and cc.status = #{status}
</if>
<if test="null == status ">
and cc.status = 0
</if>

<if test=" null != id ">
and cc.`id` = #{id}


Загрузка…
Отмена
Сохранить