|
|
@ -63,9 +63,12 @@ public class UserController {
|
|
|
|
if (optionalUser.isEmpty() || !Md5Util.getMD5String(userLoginByAccountDTO.getPassword()).equals(optionalUser.get().getPassword())) {
|
|
|
|
if (optionalUser.isEmpty() || !Md5Util.getMD5String(userLoginByAccountDTO.getPassword()).equals(optionalUser.get().getPassword())) {
|
|
|
|
return new Result<>(401, "账号或者密码错误", "");
|
|
|
|
return new Result<>(401, "账号或者密码错误", "");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
User user = optionalUser.get();
|
|
|
|
|
|
|
|
if(user.getDisabled() == 1){
|
|
|
|
|
|
|
|
return new Result<>(403, "该账号已被禁用, 请联系管理员", "");
|
|
|
|
|
|
|
|
}
|
|
|
|
// 禁用自动填充
|
|
|
|
// 禁用自动填充
|
|
|
|
MyMetaObjectHandler.setSkipUpdateFill(true);
|
|
|
|
MyMetaObjectHandler.setSkipUpdateFill(true);
|
|
|
|
User user = optionalUser.get();
|
|
|
|
|
|
|
|
user.setLoginTime(LocalDateTime.now());
|
|
|
|
user.setLoginTime(LocalDateTime.now());
|
|
|
|
userMapper.update(user, new UpdateWrapper<User>().eq("id", user.getId()));
|
|
|
|
userMapper.update(user, new UpdateWrapper<User>().eq("id", user.getId()));
|
|
|
|
// 校验通过
|
|
|
|
// 校验通过
|
|
|
|