admin
2019-03-12 4714dbbf7ead9e24f18a295890bdf5e75da991da
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
@@ -181,7 +181,15 @@
         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, "券类型不正确");
      }
@@ -521,6 +529,7 @@
   @Transactional
   @Override
   public List<UserSystemCouponVO> getOrderCouponList(Long uid) throws UserSystemCouponException, Exception {
      if (uid == null) {
         throw new UserSystemCouponException(1, "用户未登录");
      }
@@ -530,7 +539,7 @@
      // 退回券
      sendBackTimeOutCoupon(uid);
      // 活动领取券
      receivedCoupon(uid);
//      receivedCoupon(uid);
      // 订单相关的券
      List<SystemCoupon> couponList = systemCouponService.getOrderCouponList();
@@ -560,7 +569,7 @@
      sendBackTimeOutCoupon(uid);
      
      // 活动领取券
      receivedCoupon(uid);
//      receivedCoupon(uid);
      // 商品相关的券
      List<SystemCoupon> couponList = systemCouponService.getGoodsCouponList();
@@ -1545,7 +1554,6 @@
         }
         
         if (receive) {
            // 插入记录
            PushCouponRecord pushCouponRecord = new PushCouponRecord();
            pushCouponRecord.setPushCoupon(pushCoupon);