wangwei 6 年之前
父节点
当前提交
b7373fcd98

+ 3 - 3
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -242,11 +242,11 @@ public class AuthServiceImpl implements AuthService {
 	private void whenPasswordError(String accountType, String accountValue) {
 		String key = "$_PW_ERR_" + accountType + "_" + accountValue;
 
-		Long times = redisClient.get(key, Long.class);
+		Integer times = redisClient.get(key, Integer.class);
 		if (null != times) {
 			times++;
 		} else {
-			times = 1L;
+			times = 1;
 		}
 
 		redisClient.set(key, times, 60);
@@ -263,7 +263,7 @@ public class AuthServiceImpl implements AuthService {
 	private boolean limited(String accountType, String accountValue) {
 		String key = "$_PW_ERR_" + accountType + "_" + accountValue;
 
-		Long times = redisClient.get(key, Long.class);
+		Integer times = redisClient.get(key, Integer.class);
 
 		return null != times && times > 5;
 	}