From 1823b680b950e4c3a26acced18fe0629b2139c53 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期四, 15 八月 2019 09:29:33 +0800 Subject: [PATCH] 福利中心 --- fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralExchangeServiceImpl.java | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralExchangeServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralExchangeServiceImpl.java index 220ef2c..10466c9 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralExchangeServiceImpl.java +++ b/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); -- Gitblit v1.8.0