From 2406574c36a8c4e8e8ffe7c56a34e25dde107a84 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 12 四月 2019 17:08:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserLotteryRecordServiceImpl.java |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserLotteryRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserLotteryRecordServiceImpl.java
index 5e942ae..1eba8f6 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserLotteryRecordServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserLotteryRecordServiceImpl.java
@@ -164,14 +164,15 @@
 			throw new UserLotteryRecordException(2, "鎶藉娆℃暟涓嶈冻");
 		} 
 		
+		String prize = null;
+		String couponType = null;
 		// 鏂颁汉鎶藉 -宸叉娊涓鍝�
 		List<UserSystemCoupon> list = userSystemCouponService.getUserCouponBySource(uid, UserSystemCoupon.SOURCE_NEWBIES);
-	
-		String prize = null;
+		
 		if (list == null || list.size() == 0) {
 			prize = getLotteryPrizeNewbies(count, 0, null);
 		} else if (list.size() == 1) {
-			String couponType = null;
+			
 			UserSystemCoupon userSystemCoupon = list.get(0);
 			SystemCoupon systemCoupon = userSystemCoupon.getSystemCoupon();
 			if (systemCoupon != null) {
@@ -185,6 +186,9 @@
 		}
 		
 		if (prize == null || prize.trim().length() == 0) {
+			prize = "NoPrize";
+		} else if (prize.equals(couponType)) {
+			// 宸插瓨鍦ㄦ鍒�
 			prize = "NoPrize";
 		} else {
 			try {
@@ -363,7 +367,7 @@
 		String rebateCoupon = "rebateCoupon"; // 涓�寮犲鍔卞埜
 		String doubleCoupon = "doubleCoupon"; // 涓ゅ紶濂栧姳鍒�
 		
-		if (count== 1) {
+		if (count == 1) {
 			// 鍓╀綑鏈�鍚庝竴娆″繀涓�
 			long result = (1 + Math.round(Math.random() * (9)));
 			if (result <= 7) {

--
Gitblit v1.8.0