|
|
|
@ -70,6 +70,9 @@ public class UserController {
|
|
|
|
|
if (!user.isPresent() || !user.get().getPassword().equals(reqVO.getPassword())) {
|
|
|
|
|
throw new BusinessException("用户名或密码有误!");
|
|
|
|
|
}
|
|
|
|
|
if (ObjectUtil.isNotEmpty(user.get().getStatus()) && user.get().getStatus() != 0){
|
|
|
|
|
throw new BusinessException("用户已被禁用!");
|
|
|
|
|
}
|
|
|
|
|
// 更新用户最近的登录时间
|
|
|
|
|
userService.lambdaUpdate().set(User::getRecentLoginTime,LocalDateTime.now()).eq(User::getId, user.get().getId()).update();
|
|
|
|
|
String token = TokenUtil.creatToken(JSONUtil.toJsonStr(user.get()));
|
|
|
|
|