From a3ea58065f61d16f06a0883737eae320eef5c33a Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 01 八月 2019 15:47:12 +0800
Subject: [PATCH] 非任务模式不执行京东/拼多多订单

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java |   47 ++++++++++++++++++++++++-----------------------
 1 files changed, 24 insertions(+), 23 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 ca70561..7ef9acd 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
@@ -180,27 +180,27 @@
 					BigDecimal money = notify.getMoney();
 					switch (t) {
 					case HongBaoV2.TYPE_ZIGOU:
-						userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,commonOrder.getPayment(),
-								money, goodsCount, state);
+						userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,
+								commonOrder.getPayment(), money, goodsCount, state);
 						break;
 					case HongBaoV2.TYPE_SHARE_GOODS:
-					
-						userOrderMsgNotificationService.orderShareStatistic(uid, orderId,orderType, commonOrder.getPayment(),
-								money, goodsCount, state);
+
+						userOrderMsgNotificationService.orderShareStatistic(uid, orderId, orderType,
+								commonOrder.getPayment(), money, goodsCount, state);
 						break;
 					case HongBaoV2.TYPE_YIJI:
-					
-						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId,orderType, commonOrder.getPayment(),
-								money, goodsCount, state);
+
+						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
+								commonOrder.getPayment(), money, goodsCount, state);
 						break;
 					case HongBaoV2.TYPE_ERJI:
-					
-						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId,orderType, commonOrder.getPayment(),
-								money, goodsCount, state);
+
+						userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
+								commonOrder.getPayment(), money, goodsCount, state);
 						break;
 
 					case HongBaoV2.TYPE_SHARE_YIJI:
-						userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId,orderType,
+						userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
 								commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
 						break;
 					}
@@ -220,23 +220,23 @@
 					BigDecimal money = notify.getMoney();
 					switch (t) {
 					case HongBaoV2.TYPE_ZIGOU:
-						userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
-								money, state);
+						userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, orderType,
+								commonOrder.getPayment(), money, state);
 						break;
 					case HongBaoV2.TYPE_SHARE_GOODS:
-						userOrderMsgNotificationService.orderShareStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
-								money, state);
+						userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, orderType,
+								commonOrder.getPayment(), money, state);
 						break;
 					case HongBaoV2.TYPE_YIJI:
-						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
-								money, state);
+						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
+								commonOrder.getPayment(), money, state);
 						break;
 					case HongBaoV2.TYPE_ERJI:
-						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
-								money, state);
+						userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
+								commonOrder.getPayment(), money, state);
 						break;
 					case HongBaoV2.TYPE_SHARE_YIJI:
-						userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId,orderType,
+						userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId, orderType,
 								commonOrder.getPayment(), money, state);
 					}
 				}
@@ -621,7 +621,7 @@
 			// 鏌ヨ鏄惁鏈夊厤鍗曡鍒�
 			BigDecimal mianDanMoney = null;
 			if (commonOrder.getState() == CommonOrder.STATE_JS || commonOrder.getState() == CommonOrder.STATE_FK) {
-				List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(Constant.SOURCE_TYPE_TAOBAO,
+				List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(commonOrder.getSourceType(),
 						commonOrder.getOrderNo());
 				if (orderList != null && orderList.size() == 1) {// 鍙湁1涓鍗曟墠鍙備笌鍏嶅崟
 					BigDecimal payMent = commonOrder.getPayment();
@@ -645,6 +645,7 @@
 					}
 				}
 			} else if (commonOrder.getState() == CommonOrder.STATE_SX) {// 璁剧疆鍏嶅崟鍒稿け鏁�
+				commonOrder.setPayment(new BigDecimal(0));// 璁㈠崟澶辨晥鍚庣殑浠樻閲戦璁剧疆涓�0
 				try {
 					userSystemCouponService.updateStateByDrawback(commonOrder.getOrderNo());
 				} catch (Exception e) {
@@ -956,7 +957,7 @@
 			hb.setMoney(hongBao.getMoney());
 
 			try {
-				userShareGoodsGroupService.updateOrderRecord(hb,commonOrder.getSourceType());
+				userShareGoodsGroupService.updateOrderRecord(hb, commonOrder.getSourceType());
 			} catch (UserShareGoodsRecordException e) {
 				try {
 					LogHelper.errorDetailInfo(e);

--
Gitblit v1.8.0