From ee5c8055b1c0dd7c67a9025a76b10bd287c93d9a Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 15 四月 2020 09:52:27 +0800
Subject: [PATCH] 资金明细增加团队分红

---
 fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManagerV2.java |   55 ++++++++++++++++++-------------------------------------
 1 files changed, 18 insertions(+), 37 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManagerV2.java b/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManagerV2.java
index f8c810b..36d4436 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManagerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManagerV2.java
@@ -168,51 +168,25 @@
 
 							break;
 						case HongBaoV2.TYPE_ERJI:
-						
-							userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, 	commonOrder.getPayment(), money,
-									goodsCount,  commonOrder.getState(), commonOrder.getThirdCreateTime());
+
+							userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
+									commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
+									commonOrder.getThirdCreateTime());
 
 							break;
 
 						case HongBaoV2.TYPE_SHARE_YIJI:
-							userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
-									commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
+							userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
+									commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
+									commonOrder.getThirdCreateTime());
 							break;
-						}
-					}
-				}
+						case HongBaoV2.TYPE_SHARE_ERJI:
 
-				// 娣诲姞鏂扮増鏈�氱煡
+							userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
+									commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
+									commonOrder.getThirdCreateTime());
 
-				if (!hasAdd) {
-					Iterator<Integer> its = notificationMap.keySet().iterator();
-					while (its.hasNext()) {
-						Integer t = its.next();
-						HongBaoV2 notify = notificationMap.get(t).getHongBaoV2();
-						CommonOrder commonOrder = notificationMap.get(t).getCommonOrder();
-						String orderId = commonOrderList.get(0).getOrderNo();
-						Long uid = notify.getUserInfo().getId();
-						BigDecimal money = notify.getMoney();
-						switch (t) {
-						case HongBaoV2.TYPE_ZIGOU:
-							userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, orderType,
-									commonOrder.getPayment(), money, state);
 							break;
-						case HongBaoV2.TYPE_SHARE_GOODS:
-							userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, orderType,
-									commonOrder.getPayment(), money, state);
-							break;
-						case HongBaoV2.TYPE_YIJI:
-							userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
-									commonOrder.getPayment(), money, state);
-							break;
-						case HongBaoV2.TYPE_ERJI:
-							userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
-									commonOrder.getPayment(), money, state);
-							break;
-						case HongBaoV2.TYPE_SHARE_YIJI:
-							userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId, orderType,
-									commonOrder.getPayment(), money, state);
 						}
 					}
 				}
@@ -305,12 +279,14 @@
 				tempHongBao.setMoney(hongBao.getMoney());
 				CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
 				tempCommonOrder.setPayment(commonOrder.getPayment());
+				tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
 				notificationMap.put(type, new HongBaoOrder(tempCommonOrder, tempHongBao));
 			} else {
 				// 澧炲姞浠樻閲戦涓庤祫閲�
 				HongBaoOrder tempHongBaoOrder = notificationMap.get(type);
 				tempHongBaoOrder.getCommonOrder()
 						.setPayment(tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment()));
+
 				tempHongBaoOrder.getHongBaoV2()
 						.setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(hongBao.getMoney()));
 				notificationMap.put(type, tempHongBaoOrder);
@@ -339,6 +315,7 @@
 						tempHongBao.setMoney(child.getMoney());
 						CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
 						tempCommonOrder.setPayment(commonOrder.getPayment());
+						tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
 						notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
 					} else {
 						// 澧炲姞浠樻閲戦涓庤祫閲�
@@ -402,6 +379,7 @@
 				tempHongBao.setMoney(hongBao.getMoney());
 				CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
 				tempCommonOrder.setPayment(commonOrder.getPayment());
+				tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
 				notificationMap.put(type, new HongBaoOrder(tempCommonOrder, tempHongBao));
 			} else {
 				// 澧炲姞浠樻閲戦涓庤祫閲�
@@ -435,6 +413,7 @@
 								.setMoney(childUpdate.getMoney() == null ? new BigDecimal(0) : childUpdate.getMoney());
 						CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
 						tempCommonOrder.setPayment(commonOrder.getPayment());
+						tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
 						notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
 					} else {
 						// 澧炲姞浠樻閲戦涓庤祫閲�
@@ -624,6 +603,7 @@
 
 				CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
 				tempCommonOrder.setPayment(commonOrder.getPayment());
+				tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
 				notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
 			} else {
 				// 澧炲姞浠樻閲戦涓庤祫閲�
@@ -828,6 +808,7 @@
 			tempHongBao.setMoney(hongBao.getMoney());
 			CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
 			tempCommonOrder.setPayment(commonOrder.getPayment());
+			tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
 			notificationMap.put(hongBao.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
 		} else {
 			// 澧炲姞浠樻閲戦涓庤祫閲�

--
Gitblit v1.8.0