From fb2faf11c5607cffc34480228e346609d7bb5b42 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 07 十二月 2019 18:14:23 +0800
Subject: [PATCH] 会员奖励

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java |   30 +++++++-----------------------
 1 files changed, 7 insertions(+), 23 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 41e0435..f8b0ccc 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
@@ -213,8 +213,8 @@
 	 * @param list
 	 * @param signList
 	 */
-	public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, boolean exchangeCoupon,
-			Integer hongBaoState, Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList,
+	public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon,	Integer hongBaoState,
+			Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList,
 			Long uid, AcceptData acceptData) {
 
 		// 鏄惁鍏嶅崟鍟嗗搧
@@ -261,21 +261,6 @@
 
 		// 璁㈠崟鏍囪瘑
 		order.setSignList(signList);
-
-		// 1.6.5 鏄惁瀛樺湪鏂板厬鎹㈢殑鍒�
-		if (!hasRewardCoupon && exchangeCoupon) {
-			try {
-				Date thirdCreateTime = order.getThirdCreateTime();
-				if (thirdCreateTime != null) {
-					long downOrderTime = thirdCreateTime.getTime();
-					long limitDate = TimeUtil.convertDateToTemp("2019-09-10");
-					if (downOrderTime > limitDate)
-						hasRewardCoupon = true;
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
 
 		boolean rewardOrder = false;
 		int type = 1; // 1 甯歌璺宠浆椤甸潰 2寮瑰嚭閫夐」锛堝鍔卞埜锛�
@@ -470,8 +455,7 @@
 		Date august = TimeUtil.parse("2019-08-01");
 
 		// 鏄惁瀛樺湪濂栧姳鍒�
-		boolean hasRewardCoupon = userSystemCouponService.getIncludeNotExchange(uid);
-		boolean exchangeCoupon = userSystemCouponService.getIncludeExchange(uid);
+		boolean hasRewardCoupon = userSystemCouponService.getValidRebateCoupon(uid);
 
 		// 闇�瑕佹煡璇㈡槸鍚︿负VIP鐨勭敤鎴稩D,鍙湁閭�璇疯鍗曟墠闇�瑕佹煡璇�
 		List<Long> needSelectVIPUidList = new ArrayList<>();
@@ -772,16 +756,16 @@
 			} else {
 				// 濂栧姳璁㈠崟銆佸厤鍗� 浣跨敤璁板綍
 				if (sourceType == null) {
-					setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, null,
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, null,
 							signList, uid, acceptData);
 				} else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
-					setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType,
 							listRecordTB, signList, uid, acceptData);
 				} else if (sourceType == Constant.SOURCE_TYPE_JD) {
-					setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType,
 							listRecordJD, signList, uid, acceptData);
 				} else if (sourceType == Constant.SOURCE_TYPE_PDD) {
-					setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
+					setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType,
 							listRecordPDD, signList, uid, acceptData);
 				}
 			}

--
Gitblit v1.8.0