From 534a87e48dfbaff65605995ec2a29211e0a8f45a Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 15 十一月 2019 16:06:51 +0800
Subject: [PATCH] 红包功能改为2.1版本后再放开

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java |   47 ++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 42 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 72fffa5..a8f9d29 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
@@ -728,11 +728,11 @@
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶辫触鍘熷洜", COLOR_TITLE), contentList));
 
 			String handle = dto.getHandle();
-			if (StringUtil.isNullOrEmpty(handle))
-				handle = "鏃�";
-			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(handle, COLOR_CONTENT));
-			items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶勭悊", COLOR_TITLE), contentList));
+			if (!StringUtil.isNullOrEmpty(handle)) {
+				contentList = new ArrayList<>();
+				contentList.add(new ClientTextStyleVO(handle, COLOR_CONTENT));
+				items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶勭悊", COLOR_TITLE), contentList));
+			}
 
 			contentList = new ArrayList<>();
 			contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(),
@@ -989,6 +989,43 @@
 
 			return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_invite.png", dto.getTitle(),
 					msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
+		} else if (msgType == MsgTypeInviteTypeEnum.inviteNew) {
+			if (StringUtil.isNullOrEmpty(msg.getDesc()))
+				return null;
+
+			MsgInviteContentDTO dto = new Gson().fromJson(msg.getDesc(), MsgInviteContentDTO.class);
+			if (dto == null)
+				return null;
+
+			List<CommonMsgItemVO> items = new ArrayList<>();
+			List<ClientTextStyleVO> contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO(msg.getInviteUser().getWorker().getNickName() + "", COLOR_CONTENT,
+					msg.getInviteUser().getWorker().getPortrait()));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("琚個璇蜂汉", COLOR_TITLE), contentList));
+			
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO(dto.getState() + "", COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("閭�璇风姸鎬�", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO(dto.getMode() + "", COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鐔熺粌浣跨敤", COLOR_TITLE), contentList));
+			
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO(dto.getCode() + "", COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("蹇呰鏉′欢", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO(dto.getInviter() + "", COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("閫夋嫨鏉′欢", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(),
+					COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶�        娉�", COLOR_TITLE), contentList));
+
+			return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_invite.png", "閭�璇锋彁閱� ",
+					msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
 		}
 
 		if (msg.getInviteUser() == null || msg.getInviteUser().getWorker() == null)

--
Gitblit v1.8.0