From e1fcabf3946b7a5a6b76931657413a29735d0762 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 19 一月 2019 17:37:45 +0800
Subject: [PATCH] 新版消息通知

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java |  104 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 97 insertions(+), 7 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 da40bee..c953844 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,10 +10,12 @@
 import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
 import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
 import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
+import com.yeshi.fanli.entity.bus.user.BindingAccount;
 import com.yeshi.fanli.entity.bus.user.Extract;
 import com.yeshi.fanli.util.MoneyBigDecimalUtil;
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.TimeUtil;
+import com.yeshi.fanli.util.account.UserUtil;
 import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
 import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
 import com.yeshi.fanli.vo.msg.UserMsgVO;
@@ -98,8 +100,12 @@
 		// 鎻愮幇
 		if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extract) {
 
-			contentList.add(new ClientTextStyleVO(
-					"鏀粯瀹濓細" + msg.getExtract().getName() + " " + msg.getExtract().getAccount(), COLOR_CONTENT));
+			BindingAccount ba = new BindingAccount();
+			ba.setAccount(msg.getExtract().getAccount());
+			ba.setName(msg.getExtract().getName());
+			ba = UserUtil.filterBindingAccount(ba);
+
+			contentList.add(new ClientTextStyleVO("鏀粯瀹濓細" + ba.getName() + " " + ba.getAccount(), COLOR_CONTENT));
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鎻愮幇璐﹀彿", COLOR_CONTENT), contentList));
 
 			contentList = new ArrayList<>();
@@ -147,10 +153,13 @@
 			return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_extract.png", "鎻愮幇",
 					msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
 		} else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
+			BindingAccount ba = new BindingAccount();
+			ba.setAccount(msg.getAlipayAccountValid().getAccount());
+			ba.setName(msg.getAlipayAccountValid().getName());
+			ba = UserUtil.filterBindingAccount(ba);
+
 			// 鏀粯瀹濋獙璇�
-			contentList.add(new ClientTextStyleVO(
-					"鏀粯瀹濓細" + msg.getAlipayAccountValid().getName() + " " + msg.getAlipayAccountValid().getAccount(),
-					COLOR_CONTENT));
+			contentList.add(new ClientTextStyleVO("鏀粯瀹濓細" + ba.getName() + " " + ba.getAccount(), COLOR_CONTENT));
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鎻愮幇璐﹀彿", COLOR_CONTENT), contentList));
 
 			contentList = new ArrayList<>();
@@ -235,8 +244,89 @@
 			ca.add(Calendar.MONTH, -1);
 			String date = ca.get(Calendar.YEAR) + "骞�" + (ca.get(Calendar.MONTH) + 1) + "鏈�";
 
-			return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_share_money.png",
-					date + msg.getMsgType().getDesc(),
+			if (msg.getMsgType() == MsgTypeMoneyTypeEnum.share)
+				return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_share_money.png",
+						date + msg.getMsgType().getDesc(),
+						msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
+			else
+				new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_invite_money.png",
+						date + msg.getMsgType().getDesc(),
+						msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
+
+		} else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanliWeiQuan) {
+			contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("杩斿埄璁㈠崟", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("璁㈠崟缁存潈", COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鎵i櫎璇存槑", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("楼" + MoneyBigDecimalUtil.getWithNoZera(msg.getMoney()) + "",
+					COLOR_HIGHLIGHT_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("杩斿埄鎵i櫎", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("楼" + MoneyBigDecimalUtil.getWithNoZera(msg.getBalance()) + "",
+					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_fanli.png", msg.getMsgType().getDesc(),
+					msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
+		} else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.shareWeiQuan) {
+			contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("閭�璇疯鍗�", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("璁㈠崟缁存潈", COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鎵i櫎璇存槑", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("楼" + MoneyBigDecimalUtil.getWithNoZera(msg.getMoney()) + "",
+					COLOR_HIGHLIGHT_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("濂栭噾鎵i櫎", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("楼" + MoneyBigDecimalUtil.getWithNoZera(msg.getBalance()) + "",
+					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_share.png", msg.getMsgType().getDesc(),
+					msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
+		} else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.inviteWeiQuan) {
+			contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("閭�璇疯鍗�", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("璁㈠崟缁存潈", COLOR_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鎵i櫎璇存槑", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("楼" + MoneyBigDecimalUtil.getWithNoZera(msg.getMoney()) + "",
+					COLOR_HIGHLIGHT_CONTENT));
+			items.add(new CommonMsgItemVO(new ClientTextStyleVO("濂栭噾鎵i櫎", COLOR_TITLE), contentList));
+
+			contentList = new ArrayList<>();
+			contentList.add(new ClientTextStyleVO("楼" + MoneyBigDecimalUtil.getWithNoZera(msg.getBalance()) + "",
+					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.getMsgType().getDesc(),
 					msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
 		}
 

--
Gitblit v1.8.0