| | |
| | | throw new UserSystemCouponException(1, "参数不正确");
|
| | | }
|
| | |
|
| | | SystemCoupon coupon = systemCouponService.getCouponByType(couponType);
|
| | | SystemCoupon coupon = null;
|
| | | if (couponType.equals(CouponTypeEnum.welfareFreeCoupon.name())) {
|
| | | // 福利免单券
|
| | | coupon = systemCouponService.getCouponByType(couponType);
|
| | | } else if (couponType.equals(CouponTypeEnum.rebatePercentCoupon.name())) {
|
| | | // 奖励券10%
|
| | | coupon = systemCouponService.getCouponByTypeAndPercent(couponType,new BigDecimal(10));
|
| | | }
|
| | | |
| | | if (coupon == null) {
|
| | | throw new UserSystemCouponException(1, "券类型不正确");
|
| | | }
|
| | |
| | | @Transactional
|
| | | @Override
|
| | | public List<UserSystemCouponVO> getOrderCouponList(Long uid) throws UserSystemCouponException, Exception {
|
| | | |
| | | if (uid == null) {
|
| | | throw new UserSystemCouponException(1, "用户未登录");
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | if (receive) {
|
| | | |
| | | // 插入记录
|
| | | PushCouponRecord pushCouponRecord = new PushCouponRecord();
|
| | | pushCouponRecord.setPushCoupon(pushCoupon);
|