From 8cb7ec4a35a38ae91d0eed17cde711e81d2b2bbf Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期二, 14 五月 2019 11:37:49 +0800
Subject: [PATCH] 合并

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java |   61 +++++++++++++++---------------
 1 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java
index 561ca53..03c9e92 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java
@@ -46,6 +46,7 @@
 import com.yeshi.fanli.service.inter.user.ShamUserService;
 import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
 import com.yeshi.fanli.service.inter.user.TBPidService;
+import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
 import com.yeshi.fanli.service.inter.user.UserAccountService;
 import com.yeshi.fanli.service.inter.user.UserInfoService;
 import com.yeshi.fanli.service.inter.user.UserMoneyService;
@@ -133,6 +134,9 @@
 
 	@Resource
 	private UserMoneyService userMoneyService;
+
+	@Resource
+	private UserAccountBindingHistoryService userAccountBindingHistoryService;
 
 	private static final String PASSWORD_MAX_ERROR = "password_max_error";
 	private static final String EXTRACT_MIN_MONEY = "extract_min_money";
@@ -911,6 +915,8 @@
 		}
 		redisManager.cacheCommonString(key, "1", 120);
 
+		
+
 		// 鏀粯瀹濈粦瀹�
 		ForbiddenUserIdentifyCode ic = forbiddenUserIdentifyCodeService
 				.listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount, account);
@@ -1105,23 +1111,23 @@
 			deviceTokenHWService.unBindDeviceToken(acceptData.getDevice());
 		out.print(JsonUtil.loadTrueResult(""));
 	}
-	
-	
-	
+
 	/**
-	 *   鏂扮増鐧诲綍  V1.5.3
+	 * 鏂扮増鐧诲綍 V1.5.3
+	 * 
 	 * @param acceptData
 	 * @param vcode
 	 * @param phone
 	 * @param code
-	 * @param loginType 鐧诲綍鏂瑰紡锛�  1-鎵嬫満鐧诲綍   2-寰俊鐧诲綍
+	 * @param loginType
+	 *            鐧诲綍鏂瑰紡锛� 1-鎵嬫満鐧诲綍 2-寰俊鐧诲綍
 	 * @param request
 	 * @param out
 	 */
 	@RequestMapping(value = "loginNew", method = RequestMethod.POST)
-	public void loginNew(AcceptData acceptData, String vcode, String phone, String code,
-			int loginType, HttpServletRequest request, PrintWriter out) {
-		
+	public void loginNew(AcceptData acceptData, String vcode, String phone, String code, int loginType,
+			HttpServletRequest request, PrintWriter out) {
+
 		try {
 			BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
 					acceptData.getPackages());
@@ -1129,31 +1135,30 @@
 				out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 				return;
 			}
-			
+
 			UserInfo userInfo = null;
 			// 鎵嬫満鐧诲綍
 			if (loginType == 1) {
 				userInfo = userAccountService.loginPhone(request, loginType, vcode, phone, system.getAppid());
 			}
-			
+
 			// 寰俊鐧诲綍
 			if (loginType == 2) {
-				userInfo = userAccountService.loginWinXin(request,loginType, code, system.getAppid());
+				userInfo = userAccountService.loginWinXin(request, loginType, code, system.getAppid());
 			}
-			
+
 			if (userInfo == null) {
 				out.print(JsonUtil.loadFalseResult("鐧诲綍澶辫触"));
 			} else {
 				JSONObject data = new JSONObject();
 				data.put("userInfo", UserUtil.filterForClientUser(userInfo));
 				out.print(JsonUtil.loadTrueResult(data));
-				
-				
-				/* 鍚屾鏈櫥褰曚箣鍓嶈澶囨娊濂栨暟鎹�  */
+
 				final UserInfo uuser = userInfo;
 				ThreadUtil.run(new Runnable() {
 					public void run() {
 						try {
+							/* 鍚屾鏈櫥褰曚箣鍓嶈澶囨娊濂栨暟鎹� */
 							int platformType = 0;
 							String platform = acceptData.getPlatform();
 							if ("android".equals(platform)) {
@@ -1161,15 +1166,15 @@
 							} else if ("ios".equals(platform)) {
 								platformType = 2;
 							}
-							userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType, acceptData.getDevice());
+							userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType,
+									acceptData.getDevice());
 						} catch (Exception e) {
 							e.printStackTrace();
 						}
 					}
 				});
-				
 			}
-			
+
 		} catch (UserAccountException e) {
 			out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
 			try {
@@ -1186,11 +1191,9 @@
 			}
 		}
 	}
-	
-	
 
 	/**
-	 *   缁戝畾鐢佃瘽鍙风爜  V1.5.3
+	 * 缁戝畾鐢佃瘽鍙风爜 V1.5.3
 	 * 
 	 * @param acceptData
 	 * @param vcode
@@ -1199,7 +1202,7 @@
 	 */
 	@RequestMapping(value = "bindPhoneNew")
 	public void bindPhoneNew(AcceptData acceptData, Long uid, String vcode, String phone, PrintWriter out) {
-		
+
 		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
 				acceptData.getPackages());
 		if (system == null) {
@@ -1218,7 +1221,7 @@
 		}
 
 		phone = phone.replaceAll(" ", "");
-		
+
 		String oldVCode = redisManager.getSMSVCode(phone, SMSHistory.TYPE_BIND);
 		if (Constant.IS_OUTNET) {
 			if (!vcode.equalsIgnoreCase(oldVCode)) {
@@ -1227,12 +1230,11 @@
 			}
 			redisManager.clearSMSFrequencyLimit(phone, SMSHistory.TYPE_BIND);
 		}
-		
-		
+
 		try {
 			// 缁戝畾鐢ㄦ埛
 			userAccountService.bindPhoneNew(uid, phone);
-			
+
 			UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
 			// 鍒ゆ柇鐢佃瘽鍙风爜鏄惁宸茬粡灏佺
 			ForbiddenUserIdentifyCode ic = forbiddenUserIdentifyCodeService
@@ -1260,8 +1262,7 @@
 			out.print(JsonUtil.loadFalseResult(1, "缁戝畾澶辫触"));
 		}
 	}
-	
-	
+
 	/**
 	 * 鏇存敼寰俊
 	 * 
@@ -1274,7 +1275,7 @@
 	public void bindWeiXin(AcceptData acceptData, Long uid, String code, PrintWriter out) {
 		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
 				acceptData.getPackages());
-		
+
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�"));
 			return;
@@ -1287,7 +1288,7 @@
 
 		try {
 			userAccountService.bindWeiXin(uid, code);
-			
+
 			UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
 			// 鍒ゆ柇taoBaoUid鏄惁宸茬粡灏佺
 			ForbiddenUserIdentifyCode ic = forbiddenUserIdentifyCodeService

--
Gitblit v1.8.0