|
@@ -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;
|
|
|
}
|