From dd5b15229cb15459fa7c31ccea77dac28cbfafbd Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 13 四月 2020 10:04:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
index 610b34c..d6e35b1 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
@@ -21,23 +21,14 @@
 
 	@Resource
 	private MsgOtherDetailMapper msgOtherDetailMapper;
-	
+
 	@Resource
 	private UserMsgReadStateService userMsgReadStateService;
 
 	@Override
 	public void addMsgOtherDetail(MsgOtherDetail detail) throws MsgOtherDetailException {
-
-		if (detail.getType() == MsgTypeOtherTypeEnum.couponMianDan
-				|| detail.getType() == MsgTypeOtherTypeEnum.couponReward
-				|| detail.getType() == MsgTypeOtherTypeEnum.couponWelfareMianDan) {
-			if (detail.getCoupnContent() == null)
-				throw new MsgOtherDetailException(1, "鍐呭涓虹┖");
-			detail.setContent(new Gson().toJson(detail.getCoupnContent()));
-			detail.setCreateTime(new Date());
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		}
+		msgOtherDetailMapper.insertSelective(detail);
+		userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
 	}
 
 	@Override
@@ -50,6 +41,7 @@
 			if (detail.getCoupnContent() == null)
 				throw new MsgOtherDetailException(1, "鍐呭涓虹┖");
 			detail.setContent(new Gson().toJson(detail.getCoupnContent()));
+			if(detail.getUpdateTime()==null)
 			detail.setUpdateTime(new Date());
 			msgOtherDetailMapper.updateByPrimaryKeySelective(detail);
 		}

--
Gitblit v1.8.0