From e6764831a890de26fcfebb4fb8f3a22e9f8cc816 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 27 八月 2019 16:09:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java | 42 ++++++++++++++++++++++++++++-------------- 1 files changed, 28 insertions(+), 14 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 8f11e8e..5a7cf37 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 @@ -2122,13 +2122,17 @@ if (systemCoupon == null) continue; + String couponName = systemCoupon.getName(); + if (CouponTypeEnum.freeCouponGive == systemCoupon.getType()) + couponName = "鍏嶅崟鍒�"; + // 閫�鍥炴秷鎭� String beiZhu = "璇峰埌鎴戠殑-绂忓埄涓績鏌ョ湅"; SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd HH:mm"); MsgOtherGiveContentDTO msgOther = new MsgOtherGiveContentDTO(); msgOther.setType(MsgOtherGiveContentDTO.TYEP_COUPON); - msgOther.setTitle("璧犻��" + systemCoupon.getName() + "閫�鍥�"); - msgOther.setGiveType("浣犺禒閫佺殑"+ systemCoupon.getName() + "鏈鎴愬姛棰嗗彇"); + msgOther.setTitle("璧犻��" + couponName + "閫�鍥�"); + msgOther.setGiveType("浣犺禒閫佺殑"+ couponName + "鏈鎴愬姛棰嗗彇"); msgOther.setGiveTime(sd.format(record.getGiveTime())); msgOther.setReturnTime(sd.format(new Date())); userOtherMsgNotificationService.tokenGiveMsg(record.getGiveUid(), beiZhu, msgOther); @@ -2136,17 +2140,27 @@ } -// @Override -// public boolean countIncludeExchange(Long uid) { -// -// -// } -// -// -// @Override -// public boolean countNotIncludeExchange(Long uid) { -// -// -// } + @Override + public boolean getIncludeExchange(Long uid) { + List<String> list = new ArrayList<String>(); + list.add(UserSystemCoupon.SOURCE_EXCHANGE); + list.add(UserSystemCoupon.SOURCE_GIVE); + List<UserSystemCoupon> listCoupon = userSystemCouponMapper.getIncludeExchange(uid, list); + if (listCoupon == null || listCoupon.size() == 0) + return false; + return true; + } + + + @Override + public boolean getIncludeNotExchange(Long uid) { + List<String> list = new ArrayList<String>(); + list.add(UserSystemCoupon.SOURCE_EXCHANGE); + list.add(UserSystemCoupon.SOURCE_GIVE); + List<UserSystemCoupon> listCoupon = userSystemCouponMapper.getIncludeNotExchange(uid, list); + if (listCoupon == null || listCoupon.size() == 0) + return false; + return true; + } } -- Gitblit v1.8.0