From 98b1a0affd69bbe63223c21fdd2c404e8bedfccb Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 20 五月 2020 17:25:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into 2.1.2

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOrderDetailFactory.java |   84 ++++++++++++++++++++++++++++++++---------
 1 files changed, 65 insertions(+), 19 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOrderDetailFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOrderDetailFactory.java
index 386a61b..7367531 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOrderDetailFactory.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgOrderDetailFactory.java
@@ -41,20 +41,20 @@
 			return null;
 
 		String fanliName = "";
-		MsgTypeOrderTypeEnum typeEnum = null;
+		MsgTypeOrderTypeEnum orderTypeEnum = null;
 		String sourceName = Constant.getSourceName(source);
 		if (Constant.TYPE_REBATE == type) {
-			fanliName = "杩斿埄锛�";
+			fanliName = "棰勪及杩斿埄:";
 			sourceName += "-杩斿埄璁㈠崟";
-			typeEnum = MsgTypeOrderTypeEnum.fanli;
+			orderTypeEnum = MsgTypeOrderTypeEnum.orderStatistics;
 		} else if (Constant.TYPE_SHAER == type) {
-			fanliName = "濂栭噾锛�";
+			fanliName = "棰勪及濂栭噾:";
 			sourceName += "-鍒嗕韩璁㈠崟";
-			typeEnum = MsgTypeOrderTypeEnum.share;
+			orderTypeEnum = MsgTypeOrderTypeEnum.orderShare;
 		} else if (Constant.TYPE_INVITE == type) {
-			fanliName = "鏀剁泭锛�";
+			fanliName = "棰勪及鏀剁泭:";
 			sourceName += "-鍥㈤槦璁㈠崟";
-			typeEnum = MsgTypeOrderTypeEnum.invite;
+			orderTypeEnum = MsgTypeOrderTypeEnum.orderInvite;
 		}
 
 		// 娣诲姞鍐呭
@@ -70,17 +70,18 @@
 					new ClientTextStyleVO(orderId, ClientTextStyleVO.COLOR_CONTENT), true));
 		}
 
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("涓嬪崟鏃堕棿", ClientTextStyleVO.COLOR_TITLE),
+				new ClientTextStyleVO(TimeUtil.formatDate(downTime), ClientTextStyleVO.COLOR_CONTENT)));
+		
 		List<ClientTextStyleVO> contentList = new ArrayList<>();
-		contentList
-				.add(new ClientTextStyleVO("涓嬪崟鏃堕棿锛�" + TimeUtil.formatDate(downTime), ClientTextStyleVO.COLOR_CONTENT));
-		contentList.add(new ClientTextStyleVO("-鍟嗗搧鏁伴噺锛氬叡", ClientTextStyleVO.COLOR_CONTENT));
+		contentList.add(new ClientTextStyleVO("鍏�", ClientTextStyleVO.COLOR_CONTENT));
 		contentList.add(new ClientTextStyleVO(goodsCount + "", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
 		contentList.add(new ClientTextStyleVO("浠跺晢鍝�", ClientTextStyleVO.COLOR_CONTENT));
-		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("璁㈠崟鐩稿叧", ClientTextStyleVO.COLOR_TITLE),
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鍟嗗搧鏁伴噺", ClientTextStyleVO.COLOR_TITLE),
 				contentList));
 
 		List<ClientTextStyleVO> contentList2 = new ArrayList<>();
-		contentList2.add(new ClientTextStyleVO("瀹炰粯娆撅細", ClientTextStyleVO.COLOR_CONTENT));
+		contentList2.add(new ClientTextStyleVO("瀹炰粯娆�:", ClientTextStyleVO.COLOR_CONTENT));
 		contentList2.add(new ClientTextStyleVO("楼" + filterMoney(payMoney), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
 		contentList2.add(new ClientTextStyleVO("&" + fanliName, ClientTextStyleVO.COLOR_CONTENT));
 		contentList2.add(new ClientTextStyleVO("楼" + filterMoney(money), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
@@ -100,7 +101,7 @@
 		detail.setOrderType(source);
 		detail.setPayMoney(payMoney);
 		detail.setRead(false);
-		detail.setType(typeEnum);
+		detail.setType(orderTypeEnum);
 		detail.setUser(new UserInfo(uid));
 		detail.setExtraInfo(new Gson().toJson(listMsg));
 		return detail;
@@ -135,10 +136,10 @@
 		String fanliName = "";
 		String sourceName = Constant.getSourceName(source);
 		if (Constant.TYPE_REBATE == type) {
-			fanliName = "杩斿埄锛�";
+			fanliName = "棰勪及杩斿埄:";
 			sourceName +=  "-杩斿埄璁㈠崟";
 		} else if (Constant.TYPE_SHAER == type) {
-			fanliName = "濂栭噾锛�";
+			fanliName = "棰勪及濂栭噾:";
 			sourceName +=  "-鍒嗕韩璁㈠崟";
 		}
 		
@@ -153,15 +154,17 @@
 		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("璁㈠崟鍙�", ClientTextStyleVO.COLOR_TITLE),
 				new ClientTextStyleVO(orderId, ClientTextStyleVO.COLOR_CONTENT), true));
 		
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鎻愪氦鏃堕棿", ClientTextStyleVO.COLOR_TITLE),
+				new ClientTextStyleVO(TimeUtil.formatDate(submitTime), ClientTextStyleVO.COLOR_CONTENT)));
+		
 		List<ClientTextStyleVO> contentList = new ArrayList<>();
-		contentList.add(new ClientTextStyleVO("鎻愪氦鏃堕棿锛�" + TimeUtil.formatDate(submitTime), ClientTextStyleVO.COLOR_CONTENT));
-		contentList.add(new ClientTextStyleVO("-鍟嗗搧鏁伴噺锛氬叡", ClientTextStyleVO.COLOR_CONTENT));
+		contentList.add(new ClientTextStyleVO("鍏�", ClientTextStyleVO.COLOR_CONTENT));
 		contentList.add(new ClientTextStyleVO(goodsCount + "", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
 		contentList.add(new ClientTextStyleVO("浠跺晢鍝�", ClientTextStyleVO.COLOR_CONTENT));
-		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("璁㈠崟鐩稿叧", ClientTextStyleVO.COLOR_TITLE),contentList));
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鍟嗗搧鏁伴噺", ClientTextStyleVO.COLOR_TITLE),contentList));
 		
 		List<ClientTextStyleVO> contentList2 = new ArrayList<>();
-		contentList2.add(new ClientTextStyleVO("瀹炰粯娆撅細", ClientTextStyleVO.COLOR_CONTENT));
+		contentList2.add(new ClientTextStyleVO("瀹炰粯娆�:", ClientTextStyleVO.COLOR_CONTENT));
 		contentList2.add(new ClientTextStyleVO("楼" + filterMoney(payMoney), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
 		contentList2.add(new ClientTextStyleVO("&" + fanliName, ClientTextStyleVO.COLOR_CONTENT));
 		contentList2.add(new ClientTextStyleVO("楼" + filterMoney(money), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
@@ -172,6 +175,7 @@
 		
 		
 		MsgOrderDetail detail = new MsgOrderDetail();
+		detail.setOrderId(orderId);
 		detail.setBeiZhu(beiZhu);
 		detail.setCreateTime(new Date());
 		detail.setOrderType(source);
@@ -217,4 +221,46 @@
 		return detail;
 	}
 	
+	
+	/**
+	 * 鍟嗗璺戣矾
+	 * @param uid
+	 * @param orderId
+	 * @param orderSource
+	 * @param type
+	 * @return
+	 */
+	public static MsgOrderDetail orderInvalidToBusinessRunning(Long uid, String orderId, int orderSource, int type) {
+		if (uid == null || StringUtil.isNullOrEmpty(orderId))
+			return null;
+		
+		String fanliName = "";
+		String sourceName = Constant.getSourceName(orderSource);
+		if (Constant.TYPE_REBATE == type) {
+			fanliName = "杩斿埄璁㈠崟";
+		} else {
+			fanliName = "鍒嗕韩璁㈠崟";
+		}
+		
+		List<CommonMsgItemVO> listMsg = new ArrayList<>();
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("璁㈠崟鐘舵��", ClientTextStyleVO.COLOR_TITLE),
+				new ClientTextStyleVO("鍟嗗搴楅摵宸茶"+sourceName+"灏佺锛屽晢鍝佷剑閲戝凡琚喕缁擄紝鏃犳硶缁撶畻浣i噾锛岃鍗曞凡澶辨晥", ClientTextStyleVO.COLOR_CONTENT)));
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("璁㈠崟璇︽儏", ClientTextStyleVO.COLOR_TITLE),
+				new ClientTextStyleVO(fanliName, ClientTextStyleVO.COLOR_CONTENT)));
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("璁㈠崟鍙�", ClientTextStyleVO.COLOR_TITLE),
+				new ClientTextStyleVO(orderId, ClientTextStyleVO.COLOR_CONTENT)));
+		listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶囨敞", ClientTextStyleVO.COLOR_TITLE),
+				new ClientTextStyleVO("鏃�", ClientTextStyleVO.COLOR_CONTENT)));
+		
+		MsgOrderDetail detail = new MsgOrderDetail();
+		detail.setOrderId(orderId);
+		detail.setOrderType(orderSource);
+		detail.setType(MsgTypeOrderTypeEnum.businessRunning);
+		detail.setUser(new UserInfo(uid));
+		detail.setRead(false);
+		detail.setCreateTime(new Date());
+		detail.setUniquekey(StringUtil.Md5(uid+"&"+ orderId + "&" +orderSource + "&" + MsgTypeOrderTypeEnum.businessRunning.name()));
+		detail.setExtraInfo(new Gson().toJson(listMsg));
+		return detail;
+	}
 }

--
Gitblit v1.8.0