|
|
@@ -102,11 +102,12 @@ 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("home.header");
|
|
|
+ String jsonStr = configService.selectConfigByKey("client.config");
|
|
|
if(Validator.isNotEmpty(jsonStr)){
|
|
|
JSONObject objectJson = JSON.parseObject(jsonStr);
|
|
|
- if(Validator.isNotEmpty(objectJson)&&objectJson.containsKey("loginLimit")){
|
|
|
- Integer maxCount = objectJson.getInteger("loginLimit");
|
|
|
+ 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+"次,请明天再登录");
|
|
|
}
|