阶段四:快递员功能

grs
yjxx 1 month ago
parent c1766f3259
commit 2e3d44d4f9

@ -13,4 +13,7 @@ public class UserLoginByAccountDTO {
@NotBlank(message = "密码不能为空") @NotBlank(message = "密码不能为空")
@Pattern(regexp = "^.+$") @Pattern(regexp = "^.+$")
private String password; private String password;
@NotBlank(message = "请选择你的登录任务")
private Integer mark;
} }

@ -67,6 +67,9 @@ public class CommonController {
return new Result<>(401, "账号或者密码错误", ""); return new Result<>(401, "账号或者密码错误", "");
} }
User user = optionalUser.get(); User user = optionalUser.get();
if(userLoginByAccountDTO.getMark() != user.getMark()) {
return new Result<>(401, "请选择正确身份", "");
}
if (user.getDisabled() == 1) { if (user.getDisabled() == 1) {
return new Result<>(403, "该账号已被禁用, 请联系管理员", ""); return new Result<>(403, "该账号已被禁用, 请联系管理员", "");
} }

Loading…
Cancel
Save