提交代码

master
胡锐 3 weeks ago
parent 6f136f5607
commit c387fd4168
  1. 5
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java

@ -338,7 +338,10 @@ public class BsOrderServiceImpl implements BsOrderService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知优惠券");
}
if (discountUserRel.getStatus() != 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券状态不处于待使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券已失效");
}
if (new Date().compareTo(discountUserRel.getUseEndTime()) >= 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券已过期,无法使用");
}
discountUserRel.setStatus(2);
discountUserRel.setUseTime(new Date());

Loading…
Cancel
Save