From b2901a0793cfe3a1eb04318c1f8786c988e83108 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期五, 16 八月 2019 14:28:14 +0800 Subject: [PATCH] 的 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java index c941999..d3a8fd7 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java @@ -198,8 +198,8 @@ } SystemCoupon coupon = null; - if (couponType.equals(CouponTypeEnum.welfareFreeCoupon.name())) { - // 绂忓埄鍏嶅崟鍒� + if (couponType.equals(CouponTypeEnum.welfareFreeCoupon.name()) || couponType.equals(CouponTypeEnum.freeCoupon.name())) { + // 鍏嶅崟鍒� coupon = systemCouponService.getCouponByType(couponType); } else if (couponType.equals(CouponTypeEnum.rebatePercentCoupon.name())) { // 闅忔満濂栧姳鍒� @@ -219,6 +219,8 @@ if (countSuccess == 0) { stateActivated = 0; } + } else if (coupon.getType() == CouponTypeEnum.freeCoupon) { + stateActivated = 0; } // 缁撴潫鏃ユ湡 @@ -1899,7 +1901,7 @@ tokenRecord.setStartTime(nowDate); tokenRecord.setEndTime(DateUtil.plusDayDate(3, nowDate)); tokenRecord.setToken(token); - tokenRecord.setState(state); + tokenRecord.setState(0); tokenRecordService.insertSelective(tokenRecord); } catch (Exception e) { LogHelper.errorDetailInfo(e); @@ -1927,10 +1929,10 @@ String tips = "閫佺粰浣犱竴寮犺繑鍒╁鍔卞埜蹇幓棰嗗彇鍚э紝澶嶅埗鏈潯娑堟伅[&%s&]锛屾墦寮�[杩斿埄鍒竇App棰嗗彇锛屼娇鐢ㄥ悗鍙杩斿埄鍔犲�嶃�俓r\n" +"----------------------------\r\n" - + "涓嬭浇[杩斿埄鍒竇App閾炬帴:http://t.cn/2H7AXAH\r\n" + + "涓嬭浇[杩斿埄鍒竇App閾炬帴:%s\r\n" + "PS锛氬彛浠ゅ皢浼�24灏忔椂鍐呭け鏁堬紝璇峰強鏃堕鍙栥��"; - tips = String.format(tips, token); + tips = String.format(tips, token, configService.get("app_down_link")); return tips; } -- Gitblit v1.8.0