@ -13,4 +13,7 @@ public class UserLoginByAccountDTO {
@NotBlank(message = "密码不能为空")
@Pattern(regexp = "^.+$")
private String password;
@NotBlank(message = "请选择你的登录任务")
private Integer mark;
}
@ -67,6 +67,9 @@ public class CommonController {
return new Result<>(401, "账号或者密码错误", "");
User user = optionalUser.get();
if(userLoginByAccountDTO.getMark() != user.getMark()) {
return new Result<>(401, "请选择正确身份", "");
if (user.getDisabled() == 1) {
return new Result<>(403, "该账号已被禁用, 请联系管理员", "");