From 88b54772dbcf5ecab1e2316e4e4626ac901b8908 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期二, 22 一月 2019 15:58:24 +0800
Subject: [PATCH] 邀请码添加返回状态

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java |  139 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 118 insertions(+), 21 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 77f7fb0..7b4ba8d 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;
@@ -76,9 +78,10 @@
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("閭�璇峰閲�", "#888888"), contentList));
 
 		contentList = new ArrayList<>();
-		contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), "#000000"));
+		contentList.add(
+				new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(), "#000000"));
 		items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶囨敞", "#888888"), contentList));
-		return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "璁㈠崟娑堟伅",
+		return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_order.png", "璁㈠崟娑堟伅",
 				msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
 	}
 
@@ -97,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<>();
@@ -128,7 +135,7 @@
 
 			contentList = new ArrayList<>();
 			contentList.add(new ClientTextStyleVO(
-					TimeUtil.getGernalTime(msg.getExtract().getExtractTime(), "yyyy-MM-dd HH:mm"), COLOR_CONTENT));
+					TimeUtil.getGernalTime(msg.getExtract().getExtractTime()+1000*60*60*24L, "yyyy-MM-dd HH:mm"), COLOR_CONTENT));
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("棰勮鍒拌处", "#888888"), contentList));
 
 			if (msg.getExtract().getState() == Extract.STATE_PASS) {//
@@ -140,15 +147,19 @@
 			}
 
 			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
+			contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(),
+					COLOR_CONTENT));
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶囨敞", "#888888"), contentList));
-			return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "鎻愮幇",
+			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<>();
@@ -165,10 +176,11 @@
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鐘舵�佽鏄�", "#888888"), contentList));
 
 			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
+			contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(),
+					COLOR_CONTENT));
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶囨敞", "#888888"), contentList));
 
-			return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.png", "鎻愮幇璐﹀彿楠岃瘉",
+			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.fanli) {
 			// 杩斿埄鍒拌处
@@ -192,10 +204,11 @@
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("璐﹀彿浣欓", COLOR_TITLE), contentList));
 
 			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
+			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://ec-1255749512.file.myqcloud.com/resource/portrait.png", "杩斿埄鍒拌处",
+			return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_fanli.png", "杩斿埄鍒拌处",
 					msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
 
 		} else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.invite || msg.getMsgType() == MsgTypeMoneyTypeEnum.share) {
@@ -222,7 +235,8 @@
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("璐﹀彿浣欓", COLOR_TITLE), contentList));
 
 			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(msg.getBeiZhu(), COLOR_CONTENT));
+			contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(),
+					COLOR_CONTENT));
 			items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶囨敞", COLOR_TITLE), contentList));
 
 			Calendar ca = Calendar.getInstance();
@@ -230,8 +244,89 @@
 			ca.add(Calendar.MONTH, -1);
 			String date = ca.get(Calendar.YEAR) + "骞�" + (ca.get(Calendar.MONTH) + 1) + "鏈�";
 
-			return new UserMsgVO("http://ec-1255749512.file.myqcloud.com/resource/portrait.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
+				return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_invite.png.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_money.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);
 		}
 
@@ -277,9 +372,10 @@
 		items.add(new CommonMsgItemVO(new ClientTextStyleVO("鐘舵��", COLOR_TITLE), contentList));
 
 		contentList = new ArrayList<>();
-		contentList.add(new ClientTextStyleVO(msg.getBeiZhu() + "", COLOR_CONTENT));
+		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://ec-1255749512.file.myqcloud.com/resource/portrait.png", msg.getType().getDesc(),
+		return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_account.png", msg.getType().getDesc(),
 				msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
 	}
 
@@ -302,10 +398,11 @@
 		items.add(new CommonMsgItemVO(new ClientTextStyleVO("璇存槑", COLOR_TITLE), contentList));
 
 		contentList = new ArrayList<>();
-		contentList.add(new ClientTextStyleVO(msg.getBeiZhu() + "", COLOR_CONTENT));
+		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://ec-1255749512.file.myqcloud.com/resource/portrait.png", msg.getMsgType().getDesc(),
+		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