提交代码

dev-discount
胡锐 3 years ago
parent 3cdd0a7bce
commit 344d300193
  1. 19
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java

@ -253,9 +253,24 @@ public class HighOrderController {
if (highDiscountUserRel != null) {
highOrder.setMemDiscountName(highDiscountUserRel.getHighDiscount().getDiscountName());
//
// 交易优惠券使用范围
if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type1.getType())) {
// 暂无限制
} else if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type2.getType())) {
// 1:卡卷 2:金币充值 3:团油【加油站】 4: KFC 5:电影票 6:话费充值
if (!highOrder.getHighChildOrderList().get(0).getGoodsType().equals(1)) {
log.error("HighOrderController --> addOrder() error!", "此优惠券只能购买卡券商品使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "此优惠券只能购买卡券商品使用");
}
} else if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type3.getType())) {
// 1:卡卷 2:金币充值 3:团油【加油站】 4: KFC 5:电影票 6:话费充值
if (!highOrder.getHighChildOrderList().get(0).getGoodsType().equals(6)) {
log.error("HighOrderController --> addOrder() error!", "此优惠券只能充值话费中使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "此优惠券只能充值话费中使用");
}
} else {
log.error("HighOrderController --> addOrder() error!", "暂时无法使用此优惠券");
throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "暂时无法使用此优惠券");
}
// 卡卷类型 1:满减 2:抵扣 3:折扣

Loading…
Cancel
Save