From 6b8ab82d1d7fb9d44d85eeb1dfd2e36d3c28c9cf Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 10 六月 2019 11:30:21 +0800
Subject: [PATCH] 客服消息修改,新版大淘客数据添加

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 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..a81c05d 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,7 +21,7 @@
 
 	@Resource
 	private MsgOtherDetailMapper msgOtherDetailMapper;
-	
+
 	@Resource
 	private UserMsgReadStateService userMsgReadStateService;
 
@@ -34,7 +34,8 @@
 			if (detail.getCoupnContent() == null)
 				throw new MsgOtherDetailException(1, "鍐呭涓虹┖");
 			detail.setContent(new Gson().toJson(detail.getCoupnContent()));
-			detail.setCreateTime(new Date());
+			if (detail.getCreateTime() == null)
+				detail.setCreateTime(new Date());
 			msgOtherDetailMapper.insertSelective(detail);
 			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
 		}
@@ -50,6 +51,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