From d960fdbfe07a65cb80ccb764bfb15ce78ebfd84a Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 10 四月 2020 18:21:04 +0800
Subject: [PATCH] 消息修改

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
index b513dea..7575185 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -67,11 +67,24 @@
 	 * @return
 	 */
 	public static UserMsgVO create(MsgOrderDetail msg, JumpDetailV2 jumpDetail, JSONObject params) {
+		List<CommonMsgItemVO> items = new ArrayList<>();
+		
+		// 鏂扮増娑堟伅
+		if (!StringUtil.isNullOrEmpty(msg.getExtraInfo())) {
+			Gson gson = new Gson();
+			items.addAll(gson.fromJson(msg.getExtraInfo(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
 
+			UserMsgVO userMsgVO = new UserMsgVO();
+			userMsgVO.setIcon(msg.getType().getIcon());
+			userMsgVO.setTitle(msg.getType().getDesc());
+			userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
+			userMsgVO.setContentItems(items);
+			return userMsgVO;
+		}
+			 
+		
 		UserMsgVO vo = new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_order.png", "璁㈠崟娑堟伅",
 				msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), null);
-
-		List<CommonMsgItemVO> items = new ArrayList<>();
 		List<ClientTextStyleVO> contentList = new ArrayList<>();
 		if (msg.getType() == MsgTypeOrderTypeEnum.found) {
 			contentList = new ArrayList<>();
@@ -408,7 +421,6 @@
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("娓犻亾鏉ユ簮", COLOR_TITLE), contentList));
 
 			contentList = new ArrayList<>();
-
 			contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("杩斿埄璁㈠崟", COLOR_TITLE), contentList));
 
@@ -439,7 +451,7 @@
 			contentList = new ArrayList<>();
 
 			contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
-			items.add(new CommonMsgItemVO(new ClientTextStyleVO("閭�璇疯鍗�", COLOR_TITLE), contentList));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鍒嗕韩璁㈠崟", COLOR_TITLE), contentList));
 
 			contentList = new ArrayList<>();
 			contentList.add(new ClientTextStyleVO("璁㈠崟鍞悗", COLOR_CONTENT));
@@ -1228,7 +1240,9 @@
 
 		if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan
 				|| msg.getType() == MsgTypeOtherTypeEnum.couponWelfareMianDan
-				|| msg.getType() == MsgTypeOtherTypeEnum.couponReward) {
+				|| msg.getType() == MsgTypeOtherTypeEnum.couponReward
+				|| msg.getType() == MsgTypeOtherTypeEnum.freeCouponBuy
+				|| msg.getType() == MsgTypeOtherTypeEnum.freeCouponGive) {
 
 			if (StringUtil.isNullOrEmpty(msg.getContent()))
 				return null;

--
Gitblit v1.8.0