From 07c13064382007999e87abe81efe76c98a47dce8 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 05 六月 2019 11:33:56 +0800
Subject: [PATCH] 修改部分bug

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
index c0a3b20..8da44ae 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
@@ -677,14 +677,14 @@
 			updateUserInfo.setNickName(Constant.systemCommonConfig.getDefaultNickName() + user.getId());
 			userInfoMapper.updateByPrimaryKeySelective(updateUserInfo);
 		}
-		
+
 		try {
 			// 绗竴娆$櫥褰曟椂鍒涘缓鐢ㄦ埛棰濆淇℃伅
 			userInfoExtraService.createUserInfoExtra(user.getId());
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
-		
+
 	}
 
 	@Override
@@ -935,9 +935,10 @@
 
 			String oldVcode = redisManager.getSMSVCode(phone, SMSHistory.TYPE_LOGIN);
 			LogHelper.test("----------------------鐧诲綍楠岃瘉鐮侊細 " + oldVcode);
-			if (StringUtil.isNullOrEmpty(oldVcode) || !oldVcode.equalsIgnoreCase(vcode)) {
-				throw new UserAccountException(1, "楠岃瘉鐮侀敊璇紝閲嶆柊杈撳叆");
-			}
+			if (!Constant.IS_TEST)
+				if (StringUtil.isNullOrEmpty(oldVcode) || !oldVcode.equalsIgnoreCase(vcode)) {
+					throw new UserAccountException(1, "楠岃瘉鐮侀敊璇紝閲嶆柊杈撳叆");
+				}
 		}
 
 		JSONObject logInfo = new JSONObject();
@@ -1013,13 +1014,13 @@
 		UserInfo userInfo = userInfoMapper.getEffectiveUserInfoByWXUnionId(weiXinUser.getUnionid());
 		// 鐩存帴鐢ㄧ殑寰俊鐧诲綍
 		if (userInfo != null) {
-			LogHelper.test("寰俊unionID瀛樺湪:"+weiXinUser.getUnionid());
+			LogHelper.test("寰俊unionID瀛樺湪:" + weiXinUser.getUnionid());
 			// 鏇存柊璐︽埛鐧诲綍淇℃伅
 			updateLonginInfo(userInfo, loginType, request);
 			// 鍒犻櫎閭�璇峰垎浜浘
 			spreadUserImgService.deleteImgUrl(userInfo.getId());
 		} else {
-			LogHelper.test("寰俊unionID涓嶅瓨鍦�:"+weiXinUser.getUnionid());
+			LogHelper.test("寰俊unionID涓嶅瓨鍦�:" + weiXinUser.getUnionid());
 			// 鍒涘缓鏂拌处鎴�
 			userInfo = new UserInfo();
 			userInfo.setPortrait(weiXinUser.getHeadimgurl());
@@ -1110,12 +1111,12 @@
 		if (weiXinUser == null) {
 			throw new UserAccountException(2, "寰俊甯愬彿鎺堟潈澶辫触");
 		}
-		
+
 		String wxUnionId = weiXinUser.getUnionid();
 		if (StringUtil.isNullOrEmpty(wxUnionId)) {
 			throw new UserAccountException(2, "寰俊甯愬彿鎺堟潈澶辫触");
 		}
-		
+
 		String wxUnionIdExist = user.getWxUnionId();
 		if (StringUtil.isNullOrEmpty(wxUnionIdExist)) {
 			UserInfo newUser = userInfoMapper.getEffectiveUserInfoByWXUnionId(wxUnionId);
@@ -1135,14 +1136,14 @@
 		updateUserInfo.setWxOpenId(weiXinUser.getOpenid());
 		updateUserInfo.setWxPic(weiXinUser.getHeadimgurl());
 		updateUserInfo.setWxUnionId(weiXinUser.getUnionid());
-		
+
 		// 灏嗛粯璁ゆ樀绉版浛鎹㈡垚寰俊鏄电О
 		String defaultNickName = Constant.systemCommonConfig.getDefaultNickName();
 		if (!StringUtil.isNullOrEmpty(weiXinUser.getNickname()) && !StringUtil.isNullOrEmpty(defaultNickName)
 				&& defaultNickName.equals(user.getNickName())) {
 			updateUserInfo.setNickName(weiXinUser.getNickname());
-		} 
-		
+		}
+
 		// 灏嗛粯璁ゅご鍍忔浛鎹㈡垚寰俊澶村儚
 		String defaultPortrait = Constant.systemCommonConfig.getDefaultPortrait();
 		if (!StringUtil.isNullOrEmpty(weiXinUser.getHeadimgurl()) && !StringUtil.isNullOrEmpty(defaultPortrait)

--
Gitblit v1.8.0