yujian
2019-08-15 8e5fb7b57899c25ff0e5fe251f684691039f72e0
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralExchangeServiceImpl.java
@@ -158,16 +158,12 @@
      
      try {
         ExchangeTypeEnum type = exchange.getType();
         if (ExchangeTypeEnum.freeCouponBuy == type) {
            // 自购免单券
            userSystemCouponService.exchangeCoupon(uid, type.name(), UserSystemCoupon.SOURCE_EXCHANGE, false, null);
         } else if (ExchangeTypeEnum.freeCouponGive == type) {
            // 赠送免单券
            userSystemCouponService.exchangeCoupon(uid, type.name(), UserSystemCoupon.SOURCE_EXCHANGE, true, null);
         if (ExchangeTypeEnum.freeCouponBuy == type || ExchangeTypeEnum.freeCouponGive == type) {
            // 自购免单券、赠送免单券
            userSystemCouponService.exchangeCoupon(uid, type.name(), UserSystemCoupon.SOURCE_EXCHANGE, null);
         } else if (ExchangeTypeEnum.rebatePercentCoupon == type) {
            // 奖励免单券
            userSystemCouponService.exchangeCoupon(uid, type.name(), UserSystemCoupon.SOURCE_EXCHANGE, true,
                  new BigDecimal(10));
            userSystemCouponService.exchangeCoupon(uid, type.name(), UserSystemCoupon.SOURCE_EXCHANGE, new BigDecimal(10));
         } else if (ExchangeTypeEnum.inviteCodePublish == type) {
            // 邀请码发布
            if(codePublishRecordService.countValidRecord(uid) > 0)
@@ -211,6 +207,9 @@
         extraUpdate.setId(extraVO.getId());
         extraUpdate.setGoldCoin(goldCoinHas.intValue() - goldCoin.intValue());
         userInfoExtraService.saveUserInfoExtra(extraUpdate);
         exchange.setUserGoldCoin(extraUpdate.getGoldCoin() + "枚");
         return exchange;
      } catch (Exception e) {
         LogHelper.errorDetailInfo(e);