| @@ -617,7 +617,7 @@ import java.util.stream.Collectors; | |||||
| Integer oldSale = oldCoupon.getInventory() - oldCoupon.getRemainInventory(); | Integer oldSale = oldCoupon.getInventory() - oldCoupon.getRemainInventory(); | ||||
| if (!newSale.equals(oldSale)) { | if (!newSale.equals(oldSale)) { | ||||
| // 已售卖数不变 | // 已售卖数不变 | ||||
| logger.error("券库存要保证同增同减"); | |||||
| logger.error("券库存要保证同增同减 " + newSale + ", " + oldSale); | |||||
| return new ResultData(ErrorCode.COUPON_STOCK_ERR.getCode(), "券库存要保证同增同减"); | return new ResultData(ErrorCode.COUPON_STOCK_ERR.getCode(), "券库存要保证同增同减"); | ||||
| } | } | ||||
| if (!wxCoupon.getValidType().equals(oldCoupon.getValidType())) { | if (!wxCoupon.getValidType().equals(oldCoupon.getValidType())) { | ||||
| @@ -656,7 +656,7 @@ import java.util.stream.Collectors; | |||||
| Integer oldSale1 = wxCoupon.getInventory() - wxCoupon.getOrgInventory(); | Integer oldSale1 = wxCoupon.getInventory() - wxCoupon.getOrgInventory(); | ||||
| if (!newSale1.equals(oldSale1)) { | if (!newSale1.equals(oldSale1)) { | ||||
| // 库存要保证,同增同减 | // 库存要保证,同增同减 | ||||
| logger.error("券库存要保证同增同减"); | |||||
| logger.error("券库存要保证同增同减"+ newSale1 + ", " + oldSale1); | |||||
| return new ResultData(ErrorCode.COUPON_STOCK_NO_EQUAL_ERR); | return new ResultData(ErrorCode.COUPON_STOCK_NO_EQUAL_ERR); | ||||
| } | } | ||||
| @@ -668,7 +668,7 @@ import java.util.stream.Collectors; | |||||
| // 5. 更新coupon channel 有效期 | // 5. 更新coupon channel 有效期 | ||||
| if(wxCoupon.getValidType().equals(EnumCouponValidType.BETWEEN_TWO_TIME.getCode())) { | if(wxCoupon.getValidType().equals(EnumCouponValidType.BETWEEN_TWO_TIME.getCode())) { | ||||
| WxCouponChannel couponChannel = new WxCouponChannel(); | WxCouponChannel couponChannel = new WxCouponChannel(); | ||||
| couponChannel.setTenantId(wxCoupon.getTenantId()); | |||||
| couponChannel.updateTenantInfo(wxCoupon); | |||||
| couponChannel.setCouponId(wxCoupon.getId()); | couponChannel.setCouponId(wxCoupon.getId()); | ||||
| couponChannel.setEndTime(wxCoupon.getValidEndDate()); | couponChannel.setEndTime(wxCoupon.getValidEndDate()); | ||||
| wxCouponChannelMapper.updateEndTimeByCouponId(couponChannel); | wxCouponChannelMapper.updateEndTimeByCouponId(couponChannel); | ||||