From f5ad4a8171b20ab75eaac90c9717fe7fd801d6cd Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 08 三月 2019 16:18:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
index e71d99f..d20e351 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
@@ -181,7 +181,15 @@
 			throw new UserSystemCouponException(1, "鍙傛暟涓嶆纭�");
 		}
 
-		SystemCoupon coupon = systemCouponService.getCouponByType(couponType);
+		SystemCoupon coupon = null;
+		if (couponType.equals(CouponTypeEnum.welfareFreeCoupon.name())) {
+			// 绂忓埄鍏嶅崟鍒�
+			coupon = systemCouponService.getCouponByType(couponType);
+		} else if (couponType.equals(CouponTypeEnum.rebatePercentCoupon.name())) {
+			// 濂栧姳鍒�10%
+			coupon = systemCouponService.getCouponByTypeAndPercent(couponType,new BigDecimal(10));
+		}
+		
 		if (coupon == null) {
 			throw new UserSystemCouponException(1, "鍒哥被鍨嬩笉姝g‘");
 		}
@@ -521,6 +529,7 @@
 	@Transactional
 	@Override
 	public List<UserSystemCouponVO> getOrderCouponList(Long uid) throws UserSystemCouponException, Exception {
+		
 		if (uid == null) {
 			throw new UserSystemCouponException(1, "鐢ㄦ埛鏈櫥褰�");
 		}
@@ -1545,7 +1554,6 @@
 			}
 			
 			if (receive) {
-				
 				// 鎻掑叆璁板綍
 				PushCouponRecord pushCouponRecord = new PushCouponRecord();
 				pushCouponRecord.setPushCoupon(pushCoupon);

--
Gitblit v1.8.0