Commit a33f0d46 by 周晓航

增加卖券的时间校验

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 48cc17c1
......@@ -487,8 +487,12 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
return ResponseUtil.error(ResponseResult.COUPON_INVAILD.getCode(),"您需要购买的券包,包含的优惠券券编号"+activeDetailVO.getTemplateCode()+"已过期,请联系门店尽快处理");
}
// endDate 领券结束时间 校验 当前时间小鱼endDate
if (activeDetailVO.getReceiveEndTime() != null && activeDetailVO.getReceiveEndTime().before(now)) {
return ResponseUtil.error(ResponseResult.COUPON_INVAILD.getCode(),"您需要购买的券包,包含的优惠券券编号"+activeDetailVO.getTemplateCode()+"已过期,请联系门店尽快处理");
if (activeDetailVO.getReceiveStartTime() != null && now.before(activeDetailVO.getReceiveStartTime())) {
return ResponseUtil.error(ResponseResult.COUPON_INVAILD.getCode(),"您需要购买的券包,包含的优惠券券编号"+activeDetailVO.getTemplateCode()+"未到领券时间,请联系门店尽快处理");
}
if (activeDetailVO.getReceiveEndTime() != null && now.before(activeDetailVO.getReceiveEndTime())) {
return ResponseUtil.error(ResponseResult.COUPON_INVAILD.getCode(),"您需要购买的券包,包含的优惠券券编号"+activeDetailVO.getTemplateCode()+"领券时间已结束,请联系门店尽快处理");
}
// state = 1 || 2 可以买
if (activeDetailVO.getStatus() !=null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment