From 3b956ac2380929552bd53fad5a9a0515a3b0d62f Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期一, 16 十二月 2019 14:52:07 +0800
Subject: [PATCH] 邀请图分页 + 品牌删除版本区分

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 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 6adf1af..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
@@ -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