From c8f11c229b87d1652b6da0b15576c166cd51eb8b Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 01 一月 2020 14:25:22 +0800
Subject: [PATCH] 首页悬浮图mapperbug修改,增加商品详情中的比例展示

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 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..ea0b6e2 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
@@ -230,7 +230,7 @@
 	}
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	public UserSystemCoupon insertUserCoupon(Long uid, String couponType, String source, BigDecimal percent,
 			Boolean needNotify) throws UserSystemCouponException, Exception {
 
@@ -344,7 +344,7 @@
 		return userCoupon;
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	@Override
 	public List<UserSystemCouponVO> getUserCouponVOList(long start, int count, Long uid, boolean changeJump)
 			throws UserSystemCouponException, Exception {
@@ -610,7 +610,7 @@
 		return hasCoupon;
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	@Override
 	public List<UserSystemCouponVO> getOrderCouponList(Long uid) throws UserSystemCouponException, Exception {
 
@@ -633,7 +633,7 @@
 		return getEnableListByCouponId(uid, 1, couponList);
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	@Override
 	public List<UserSystemCouponVO> getGoodsCouponList(Long uid, Long auctionId)
 			throws UserSystemCouponException, Exception {
@@ -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);
@@ -955,7 +955,7 @@
 		}
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	public void useRewardCouponCore(UserSystemCoupon userSystemCoupon, BigDecimal money, BigDecimal hongBao, Long uid,
 			Order order) throws Exception {
 		org.springframework.transaction.TransactionStatus transactionStatus = transactionManager
@@ -1358,7 +1358,7 @@
 		}
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	@Override
 	public void updateStateByDrawback(String orderNo) throws Exception {
 
@@ -1380,7 +1380,7 @@
 		sendBackCoupon(record.getUserSystemCoupon(), record);
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	@Override
 	public void updateStateByArrivalAccount(String orderNo) throws Exception {
 
@@ -1414,7 +1414,7 @@
 		return userSystemCouponMapper.getCounponNowInvalid(count);
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	@Override
 	public boolean updateCouponRecordUsed(Long uid, String orderNo, BigDecimal payment, Long auctionId)
 			throws Exception {
@@ -1494,7 +1494,7 @@
 	}
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	public void copyLotteryPrize(Long uid, int platform, String device) throws Exception {
 
 		return;
@@ -1577,7 +1577,7 @@
 	}
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	public void randomRewardCoupon(int num, Long uid, String source) throws Exception {
 		if (num < 1) {
 			return;
@@ -1717,7 +1717,7 @@
 	}
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	public void exchangeCoupon(Long uid, String couponType, String source, BigDecimal percent)
 			throws UserSystemCouponException, Exception {
 		if (couponType == null || uid == null) {
@@ -1773,7 +1773,7 @@
 		insertSelective(userCoupon);
 	}
 
-	@Transactional
+	@Transactional(rollbackFor=Exception.class)
 	@Override
 	public List<UserSystemCouponVO> getCouponList(AcceptData acceptData, long start, int count, Long uid)
 			throws UserSystemCouponException, Exception {
@@ -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