From 1011d9d0aaab0e978caf4513b64f0a369bcd9a96 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期一, 22 七月 2019 15:39:56 +0800
Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java
index a63abe7..3fc166c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java
@@ -152,6 +152,8 @@
 	public void addHongBao(List<CommonOrder> commonOrderList, int type) throws HongBaoException {
 		Set<Integer> stateSet = new HashSet<>();// 璁㈠崟鐘舵�丼et
 		if (commonOrderList != null && commonOrderList.size() > 0) {
+			int orderType = commonOrderList.get(0).getSourceType();
+
 			Map<Integer, HongBaoOrder> notificationMap = new HashMap<>();
 			int goodsCount = 0;
 			boolean hasAdd = false;
@@ -183,30 +185,30 @@
 					BigDecimal money = notify.getMoney();
 					switch (t) {
 					case HongBaoV2.TYPE_ZIGOU:
-						userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,commonOrder.getPayment(),
 								money, goodsCount, state);
 						break;
 					case HongBaoV2.TYPE_SHARE_GOODS:
 						userNotificationService.orderShareStatisticed(uid, orderId, goodsCount, MsgOrderDetail.STATE_FK,
 								null, money);
-						userOrderMsgNotificationService.orderShareStatistic(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderShareStatistic(uid, orderId,orderType, commonOrder.getPayment(),
 								money, goodsCount, state);
 						break;
 					case HongBaoV2.TYPE_YIJI:
 						userNotificationService.orderInviteStatisticed(uid, orderId, goodsCount,
 								MsgOrderDetail.STATE_FK, null, money);
-						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId,orderType, commonOrder.getPayment(),
 								money, goodsCount, state);
 						break;
 					case HongBaoV2.TYPE_ERJI:
 						userNotificationService.orderInviteStatisticed(uid, orderId, goodsCount,
 								MsgOrderDetail.STATE_FK, null, money);
-						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId,orderType, commonOrder.getPayment(),
 								money, goodsCount, state);
 						break;
 
 					case HongBaoV2.TYPE_SHARE_YIJI:
-						userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId,
+						userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId,orderType,
 								commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
 						break;
 					}
@@ -226,23 +228,23 @@
 					BigDecimal money = notify.getMoney();
 					switch (t) {
 					case HongBaoV2.TYPE_ZIGOU:
-						userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
 								money, state);
 						break;
 					case HongBaoV2.TYPE_SHARE_GOODS:
-						userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderShareStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
 								money, state);
 						break;
 					case HongBaoV2.TYPE_YIJI:
-						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
 								money, state);
 						break;
 					case HongBaoV2.TYPE_ERJI:
-						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, commonOrder.getPayment(),
+						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
 								money, state);
 						break;
 					case HongBaoV2.TYPE_SHARE_YIJI:
-						userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId,
+						userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId,orderType,
 								commonOrder.getPayment(), money, state);
 					}
 				}
@@ -288,7 +290,8 @@
 					payMent = commonOrder.getSettlement();
 
 				if (payMent.compareTo(new BigDecimal(10)) < 0) {
-					mianDan = userSystemCouponRecordService.isSuccessMianDan(commonOrder.getSourceType(),commonOrder.getOrderNo());
+					mianDan = userSystemCouponRecordService.isSuccessMianDan(commonOrder.getSourceType(),
+							commonOrder.getOrderNo());
 				}
 			}
 

--
Gitblit v1.8.0