From e6764831a890de26fcfebb4fb8f3a22e9f8cc816 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 27 八月 2019 16:09:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
index 82441ef..d1dfd74 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -548,13 +548,13 @@
 			} else {
 				// 濂栧姳璁㈠崟銆佸厤鍗� 浣跨敤璁板綍
 				if (sourceType == null) {
-					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, null, signList);
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, null, signList, acceptData);
 				} else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
-					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordTB, signList);
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordTB, signList, acceptData);
 				} else if (sourceType == Constant.SOURCE_TYPE_JD) {
-					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordJD, signList);
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordJD, signList, acceptData);
 				} else if (sourceType == Constant.SOURCE_TYPE_PDD) {
-					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordPDD, signList);
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordPDD, signList, acceptData);
 				}
 			}
 
@@ -577,7 +577,7 @@
 	 * @param signList
 	 */
 	public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, Integer hongBaoState,
-			Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList) {
+			Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList, AcceptData acceptData) {
 
 		// 鏄惁鍏嶅崟鍟嗗搧
 		boolean freeOrder = false;
@@ -597,7 +597,8 @@
 						signList.add(PIC_REWARD); // 鍔犲叆濂栧姳鎴愬姛鍥剧墖
 
 					} else if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
-							|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+							|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+							|| CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
 
 						if (UserSystemCouponRecord.STATE_FREE_ON == state) {
 							// 鍏嶅崟涓�
@@ -645,6 +646,9 @@
 
 			Map<String, Object> jumpLink = new HashMap<String, Object>();
 			jumpLink.put("orderNo", order.getOrderNo());
+			if (VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
+				jumpLink.put("goodsType", order.getSourceType());
+			}
 
 			Map<String, Object> jump = new HashMap<String, Object>();
 			jump.put("type", type);
@@ -667,6 +671,9 @@
 
 			Map<String, Object> jumpLink = new HashMap<String, Object>();
 			jumpLink.put("orderNo", order.getOrderNo());
+			if (VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
+				jumpLink.put("goodsType", order.getSourceType());
+			}
 
 			Map<String, Object> jump = new HashMap<String, Object>();
 			jump.put("type", 1); // 椤甸潰璺宠浆
@@ -1165,7 +1172,8 @@
 						String systemCouponType = couponRecord.getCouponType();
 						Integer couponState = couponRecord.getState();
 						if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
-								|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+								|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+								|| CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
 							if (UserSystemCouponRecord.STATE_SUCCESS == couponState) {
 								// 鍏嶅崟鎴愬姛
 								order.setOtherState(2);
@@ -1182,7 +1190,8 @@
 						String systemCouponType = couponRecord.getCouponType();
 						Integer couponState = couponRecord.getState();
 						if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
-								|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+								|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+								|| CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
 							if (UserSystemCouponRecord.STATE_SUCCESS == couponState) {
 								// 鍏嶅崟鎴愬姛
 								order.setOtherState(2);
@@ -1199,7 +1208,8 @@
 						String systemCouponType = couponRecord.getCouponType();
 						Integer couponState = couponRecord.getState();
 						if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
-								|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+								|| CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+								|| CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
 							if (UserSystemCouponRecord.STATE_SUCCESS == couponState) {
 								// 鍏嶅崟鎴愬姛
 								order.setOtherState(2);

--
Gitblit v1.8.0