From 89cc8f054c27f70fcfe16f14554a8a12e0c19e23 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期三, 18 十二月 2019 09:22:31 +0800 Subject: [PATCH] 邀请统计 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 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 88a12ab..c9f73e0 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 @@ -885,7 +885,7 @@ throw new UserSystemCouponException(1, "璇ヨ鍗曚笉鑳戒娇鐢ㄥ鍔卞埜"); long downOrderTime = thirdCreateTime.getTime(); - long limitDate = TimeUtil.parse(Constant.COUPON_REWARD_TIME).getTime(); + long limitDate = TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME); if (downOrderTime > limitDate) { boolean valid = false; Date endDay = DateUtil.plusDayDate(Constant.COUPON_REWARD_LIMIT_DAY, accountTime); @@ -2075,12 +2075,13 @@ } Date nowDate = new Date(); + Date endTime = DateUtil.plusDayDate(Constant.GIVE_DAYS, nowDate); // 鎻掑叆璧犻�佽褰� UserSystemCouponGiveRecord giveRecord = new UserSystemCouponGiveRecord(); giveRecord.setCouponId(id); giveRecord.setGiveUid(uid); giveRecord.setGiveTime(nowDate); - giveRecord.setEndTime(DateUtil.plusDayDate(Constant.GIVE_DAYS, nowDate)); + giveRecord.setEndTime(endTime); userSystemCouponGiveRecordService.insertSelective(giveRecord); // 鍒涘缓璁板綍 @@ -2089,7 +2090,7 @@ tokenRecord.setIdentify(giveRecord.getId() + ""); tokenRecord.setType(tokenTypeEnum); tokenRecord.setStartTime(nowDate); - tokenRecord.setEndTime(DateUtil.plusDayDate(Constant.TOKEN_DAYS, nowDate)); + tokenRecord.setEndTime(endTime); tokenRecord.setState(0); tokenRecordService.insertSelective(tokenRecord); @@ -2125,6 +2126,8 @@ msg.setUserSystemCouponId(id); msg.setCouponType(type.name()); Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.systemCouponDrawback, msg); + // 寤惰繜涓�鍒嗛挓 + message.setStartDeliverTime(endTime.getTime() + 1000 * 60); try { producer.send(message); } catch (Exception e) { @@ -2317,7 +2320,7 @@ } @Override - @RequestSerializableByKeyService(key = "#id") + @RequestSerializableByKeyService(key = "#couponId") @Transactional(rollbackFor = Exception.class) public void sendBackByGiveId(Long couponId) { if (couponId == null) -- Gitblit v1.8.0