From e8f00cc0506705a2bed7dd4e060541230a7d2ab2 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 28 四月 2020 14:50:55 +0800
Subject: [PATCH] 线上版本用户升级普通会员

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
index 3cbd1c8..e5447c2 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
@@ -171,20 +171,19 @@
 		// 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳
 		if (doneZiGou >= limitZiGou7) {
 			try {
-				twoProcess(uid, limitZiGou7, null);
+				twoProcess(uid, limitZiGou7, null, false);
 			} catch (UserVIPPreInfoException e) {
 
 			}
 		}
 	}
-	
+
 	@Override
 	@RequestSerializableByKeyService(key = "#uid")
 	@Transactional(rollbackFor = Exception.class)
 	public void upgradeVipByTeamNum(Long uid) {
 		vipTeamVerify(uid);
 	}
-	
 
 	@Override
 	@RequestSerializableByKeyService(key = "#tid")
@@ -197,8 +196,6 @@
 		vipTeamVerify(boss.getId());
 	}
 
-	
-	
 	/**
 	 * 楠岃瘉鐢ㄦ埛鏄惁婊¤冻鍗囩骇闃熷憳鏉′欢
 	 * @param uid
@@ -220,11 +217,17 @@
 
 		long limitFirst7 = 0;
 		String first7 = userVipConfigService.getValueByKey("vip_pre_7_first_level_team_count");
+		if (Constant.IS_TEST)
+			first7 = "30";
+
 		if (!StringUtil.isNullOrEmpty(first7)) {
 			limitFirst7 = Long.parseLong(first7);
 		}
+		
 		long limitSecond7 = 0;
 		String second7 = userVipConfigService.getValueByKey("vip_pre_7_second_level_team_count");
+		if (Constant.IS_TEST)
+			second7 = "30";
 		if (!StringUtil.isNullOrEmpty(second7)) {
 			limitSecond7 = Long.parseLong(second7);
 		}
@@ -232,15 +235,13 @@
 		// 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳
 		if (doneFirst >= limitFirst7 && doneSecond >= limitSecond7) {
 			try {
-				twoProcess(uid, limitFirst7, limitSecond7);
+				twoProcess(uid, limitFirst7, limitSecond7, true);
 			} catch (UserVIPPreInfoException e) {
 
 			}
 		}
 	}
-	
-	
-	
+
 	/**
 	 * 浜岄樁娈�
 	 * 
@@ -251,12 +252,12 @@
 	 * @param secondTeam
 	 */
 	@Transactional(rollbackFor = Exception.class)
-	private void twoProcess(Long uid, long limit1, Long limit2) throws UserVIPPreInfoException {
+	private void twoProcess(Long uid, long limit1, Long limit2, boolean teamPass) throws UserVIPPreInfoException {
 		String item = null;
-		if (limit2 == null) {
-			item = "杩斿埄+鍒嗕韩璁㈠崟";
-		} else {
+		if (teamPass) {
 			item = "鐩存帴+闂存帴绮変笣";
+		} else {
+			item = "杩斿埄+鍒嗕韩璁㈠崟";
 		}
 
 		Date upgradeTime = new Date();
@@ -284,7 +285,7 @@
 				registerTime = userInfoRegister.getCreateTime();
 			}
 			int daysBetween = TimeUtil.getDayDifferenceCount(registerTime, upgradeTime);
-			userAccountMsgNotificationService.vipPreUpgrade(uid, "蹇渷杈句汉", "楂樼骇浼氬憳", daysBetween, limit1, limit2);
+			userAccountMsgNotificationService.vipPreUpgrade(uid, "蹇渷杈句汉", "楂樼骇浼氬憳", daysBetween, limit1, limit2, teamPass);
 
 			// 鐩存帴绮変笣鍗囩骇鎻愰啋
 			ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);

--
Gitblit v1.8.0