|
@@ -107,14 +107,16 @@ public class UserLoginErrorServiceImpl extends ServiceImpl<UserLoginErrorMapper,
|
|
|
lqwExam.eq(UserLoginError::getLoginAccount, loginAccount);
|
|
|
lqwExam.eq(UserLoginError::getDate, DateUtils.getTodayZeroTime());
|
|
|
Integer count = baseMapper.selectCount(lqwExam);
|
|
|
- String jsonStr = configService.selectConfigByKey("client.config");
|
|
|
+ String jsonStr = configService.selectConfigByKeyNoCache("client.config");
|
|
|
if(Validator.isNotEmpty(jsonStr)){
|
|
|
JSONObject objectJson = JSON.parseObject(jsonStr);
|
|
|
if(Validator.isNotEmpty(objectJson)&&objectJson.containsKey("other")){
|
|
|
JSONObject jsonObject = objectJson.getJSONObject("other");
|
|
|
Integer maxCount = jsonObject.getInteger("loginLimit");
|
|
|
- if(maxCount>0&&count>=maxCount){
|
|
|
- throw new CustomException("今天你的错误次数已超过"+maxCount+"次,请明天再登录");
|
|
|
+ if(Validator.isNotEmpty(maxCount)){
|
|
|
+ if(maxCount>0&&count>=maxCount){
|
|
|
+ throw new CustomException("今天你的错误次数已超过"+maxCount+"次,请明天再登录");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|