From b72be3656e4a381a60ada768a58fa8523719b10d Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 29 八月 2019 19:14:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 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 41565c1..ee0fdca 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
@@ -10,6 +10,7 @@
 import com.yeshi.fanli.dto.msg.MsgOtherCouponContentDTO;
 import com.yeshi.fanli.dto.msg.MsgOtherExchangeContentDTO;
 import com.yeshi.fanli.dto.msg.MsgOtherGiveContentDTO;
+import com.yeshi.fanli.dto.msg.MsgOtherRewardIntegralDTO;
 import com.yeshi.fanli.dto.msg.MsgOtherTaoLiJinContentDTO;
 import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
 import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
@@ -844,8 +845,56 @@
 			userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
 			userMsgVO.setContentItems(items);
 			return userMsgVO;
+		} else if (msg.getType() == MsgTypeOtherTypeEnum.firstOrderReward) {
+			if (StringUtil.isNullOrEmpty(msg.getContent()))
+				return null;
+
+			MsgOtherRewardIntegralDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherRewardIntegralDTO.class);
+			if (dto == null)
+				return null;
+
+			icon = "http://img.flqapp.com/resource/msg/icon_msg_other_integral.png";
+			
+			List<ClientTextStyleVO> contentList = new ArrayList<>();
+			
+			if (!StringUtil.isNullOrEmpty(dto.getSource())) {
+				contentList = new ArrayList<>();
+				contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT));
+				items.add(new CommonMsgItemVO(new ClientTextStyleVO("鏉ユ簮", COLOR_TITLE), contentList));
+			}
+
+			if (!StringUtil.isNullOrEmpty(dto.getNum())) {
+				contentList = new ArrayList<>();
+				contentList.add(new ClientTextStyleVO(dto.getNum() + "", COLOR_CONTENT));
+				items.add(new CommonMsgItemVO(new ClientTextStyleVO("鏁伴噺", COLOR_TITLE), contentList));
+			}
+
+			if (!StringUtil.isNullOrEmpty(dto.getTotal())) {
+				contentList = new ArrayList<>();
+				contentList.add(new ClientTextStyleVO(dto.getTotal() + "", COLOR_CONTENT));
+				items.add(new CommonMsgItemVO(new ClientTextStyleVO("鍓╀綑", COLOR_TITLE), contentList));
+			}
+			
+			if (!StringUtil.isNullOrEmpty(dto.getExplain())) {
+				contentList = new ArrayList<>();
+				contentList.add(new ClientTextStyleVO(dto.getExplain() + "", 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));
+			
+			UserMsgVO userMsgVO = new UserMsgVO();
+			userMsgVO.setIcon(icon);
+			userMsgVO.setTitle(dto.getTitle());
+			userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
+			userMsgVO.setContentItems(items);
+			return userMsgVO;
 		}
 
+
 		return new UserMsgVO(icon, msg.getType().getDesc(),
 				msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
 	}

--
Gitblit v1.8.0