소스 검색

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

release_toaliyun_real
luozukai 6 년 전
부모
커밋
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); WxCoupon coupon = wxCouponService.findById(wxCoupon);
if(coupon!=null){ 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())) if((wxCoupon.getValidEndDate()!=null&&coupon.getValidEndDate()!=null && DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate()))
&& wxCoupon.getInventory().equals(coupon.getInventory())) && wxCoupon.getInventory().equals(coupon.getInventory()))
|| ||
(wxCoupon.getValidDays()!=null && coupon.getValidDays()!=null && 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); 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>


<sql id="dynamicWhereConditions"> <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 "> <if test=" null != id ">
and cc.`id` = #{id} and cc.`id` = #{id}


불러오는 중...
취소
저장