admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralExchangeServiceImpl.java
@@ -247,22 +247,24 @@
            thing = "自购免单券";
            thingNum = "1张";
            userSystemCouponService.exchangeCoupon(uid, CouponTypeEnum.freeCouponBuy.name(),
                  UserSystemCoupon.SOURCE_EXCHANGE, null);
            userSystemCouponService.freeCouponWin(uid, CouponTypeEnum.freeCouponBuy, UserSystemCoupon.SOURCE_EXCHANGE,
                  1, true);
            once = true;
            couponNews = 1;
         } else if (ExchangeTypeEnum.freeCouponGive == type) {
            thing = "赠送免单券";
            thingNum = "1张";
            userSystemCouponService.exchangeCoupon(uid, CouponTypeEnum.freeCouponGive.name(),
                  UserSystemCoupon.SOURCE_EXCHANGE, null);
            userSystemCouponService.freeCouponWin(uid, CouponTypeEnum.freeCouponGive, UserSystemCoupon.SOURCE_EXCHANGE,
                  1, true);
            couponNews = 1;
         } else if (ExchangeTypeEnum.rebatePercentCoupon == type) {
            thing = "返利奖励券";
            thingNum = "1张";
            String percent = configService.get(ConfigKeyEnum.exchangeRebatePercent.getKey());
            userSystemCouponService.exchangeCoupon(uid, CouponTypeEnum.rebatePercentCoupon.name(),
                  UserSystemCoupon.SOURCE_EXCHANGE, new BigDecimal(percent));
            userSystemCouponService.rewardCouponWin(uid, UserSystemCoupon.SOURCE_EXCHANGE, 1,
                  true, new BigDecimal(percent));
            couponNews = 1;
         } else if (ExchangeTypeEnum.inviteCodePublish == type) {
            thing = "邀请码发布卡";
@@ -335,15 +337,15 @@
         // 消息
         final String things = thing;
         final String exNum = thingNum;
         executor.execute(new Runnable() {
            @Override
            public void run() {
               MsgOtherExchangeContentDTO msgOther = new MsgOtherExchangeContentDTO();
               msgOther.setState("金币兑换成功");
               msgOther.setExpend(goldCoin + "金币");
               msgOther.setTotalGold(surplus + "金币");
               msgOther.setThing(things);
               userOtherMsgNotificationService.exchangeMsg(uid, "", msgOther);
               if (ExchangeTypeEnum.inviteCodePublish == type) {
                  userOtherMsgNotificationService.goldCoinExChangeMsg(uid, goldCoin, surplus, things, "1张");
               } else {
                  userOtherMsgNotificationService.goldCoinExChangeMsg(uid, goldCoin, surplus, things, exNum);
               }
            }
         });
@@ -458,19 +460,7 @@
         executor.execute(new Runnable() {
            @Override
            public void run() {
               UserInfo userInfo = userInfoService.selectByPKey(record.getUid());
               if (userInfo == null)
                  return;
               String beizu = "邀请人:" + userInfo.getNickName() + ",邀请码:" + inviteCode;
               MsgOtherExchangeContentDTO msgOther = new MsgOtherExchangeContentDTO();
               msgOther.setState("金币兑换成功");
               msgOther.setExpend(goldCoin + "金币");
               msgOther.setTotalGold(surplus + "金币");
               msgOther.setThing("邀请码激活卡");
               userOtherMsgNotificationService.exchangeMsg(uid, beizu, msgOther);
               userOtherMsgNotificationService.goldCoinExChangeMsg(uid, goldCoin, surplus, "邀请码激活卡", "1张");
            }
         });