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 |   55 ++++++++++++++++++++++++-------------------------------
 1 files changed, 24 insertions(+), 31 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 6dfde25..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
@@ -25,7 +25,6 @@
 import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoWeiQuanOrderMapper;
 import com.yeshi.fanli.dto.HongBao;
 import com.yeshi.fanli.dto.HongBaoDTO;
-import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
 import com.yeshi.fanli.entity.bus.user.HongBaoV2;
 import com.yeshi.fanli.entity.bus.user.ThreeSale;
 import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
@@ -48,7 +47,6 @@
 import com.yeshi.fanli.service.inter.order.ShareGoodsActivityOrderService;
 import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
 import com.yeshi.fanli.service.inter.user.UserInfoService;
-import com.yeshi.fanli.service.inter.user.UserNotificationService;
 import com.yeshi.fanli.service.inter.user.UserShareGoodsGroupService;
 import com.yeshi.fanli.service.inter.user.UserSystemCouponRecordService;
 import com.yeshi.fanli.service.inter.user.UserSystemCouponService;
@@ -95,9 +93,6 @@
 
 	@Resource
 	private ThreeSaleSerivce threeSaleSerivce;
-
-	@Resource
-	private UserNotificationService userNotificationService;
 
 	@Resource
 	private UserOrderMsgNotificationService userOrderMsgNotificationService;
@@ -185,30 +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:
-						userNotificationService.orderShareStatisticed(uid, orderId, goodsCount, MsgOrderDetail.STATE_FK,
-								null, money);
-						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:
-						userNotificationService.orderInviteStatisticed(uid, orderId, goodsCount,
-								MsgOrderDetail.STATE_FK, null, money);
-						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:
-						userNotificationService.orderInviteStatisticed(uid, orderId, goodsCount,
-								MsgOrderDetail.STATE_FK, null, money);
-						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;
 					}
@@ -228,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);
 					}
 				}
@@ -629,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();
@@ -653,6 +645,7 @@
 					}
 				}
 			} else if (commonOrder.getState() == CommonOrder.STATE_SX) {// 璁剧疆鍏嶅崟鍒稿け鏁�
+				commonOrder.setPayment(new BigDecimal(0));// 璁㈠崟澶辨晥鍚庣殑浠樻閲戦璁剧疆涓�0
 				try {
 					userSystemCouponService.updateStateByDrawback(commonOrder.getOrderNo());
 				} catch (Exception e) {
@@ -964,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