取消uplaoder 岗位

This commit is contained in:
wh
2026-04-23 12:27:44 +08:00
parent cbef58aee5
commit 9483bea005
7 changed files with 8 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ public record LoginUser(
@Schema(description = "用户名,可为空", example = "alpha-reviewer") String username, @Schema(description = "用户名,可为空", example = "alpha-reviewer") String username,
@Schema(description = "真实姓名") String realName, @Schema(description = "真实姓名") String realName,
@Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role, @Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role,
@Schema(description = "岗位,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position, @Schema(description = "岗位枚举值ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position,
@Schema(description = "是否必须修改密码") boolean mustChangePassword, @Schema(description = "是否必须修改密码") boolean mustChangePassword,
@Schema(description = "会话版本") Integer sessionVersion @Schema(description = "会话版本") Integer sessionVersion
) { ) {

View File

@@ -12,6 +12,6 @@ public record CreateUserRequest(
@Schema(description = "用户名,前端展示用,可为空", example = "alpha-admin") String username, @Schema(description = "用户名,前端展示用,可为空", example = "alpha-admin") String username,
@Schema(description = "真实姓名") @NotBlank(message = "不能为空") String realName, @Schema(description = "真实姓名") @NotBlank(message = "不能为空") String realName,
@Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") @NotNull(message = "不能为空") UserRole role, @Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") @NotNull(message = "不能为空") UserRole role,
@Schema(description = "岗位,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") @NotNull(message = "不能为空") UserPosition position @Schema(description = "岗位枚举值ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") @NotNull(message = "不能为空") UserPosition position
) { ) {
} }

View File

@@ -8,6 +8,6 @@ import jakarta.validation.constraints.NotNull;
@Schema(description = "修改员工角色岗位请求") @Schema(description = "修改员工角色岗位请求")
public record UpdateUserAssignmentRequest( public record UpdateUserAssignmentRequest(
@Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") @NotNull(message = "不能为空") UserRole role, @Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") @NotNull(message = "不能为空") UserRole role,
@Schema(description = "岗位,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") @NotNull(message = "不能为空") UserPosition position @Schema(description = "岗位枚举值ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") @NotNull(message = "不能为空") UserPosition position
) { ) {
} }

View File

@@ -15,7 +15,7 @@ public record CurrentUserResponse(
@Schema(description = "用户名,可为空", example = "alpha-admin") String username, @Schema(description = "用户名,可为空", example = "alpha-admin") String username,
@Schema(description = "真实姓名") String realName, @Schema(description = "真实姓名") String realName,
@Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role, @Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role,
@Schema(description = "岗位,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position, @Schema(description = "岗位枚举值ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position,
@Schema(description = "是否必须修改密码") boolean mustChangePassword @Schema(description = "是否必须修改密码") boolean mustChangePassword
) { ) {
public static CurrentUserResponse from(LoginUser loginUser) { public static CurrentUserResponse from(LoginUser loginUser) {

View File

@@ -14,7 +14,7 @@ public record LoginResponse(
@Schema(description = "用户名,可为空", example = "alpha-admin") String username, @Schema(description = "用户名,可为空", example = "alpha-admin") String username,
@Schema(description = "真实姓名") String realName, @Schema(description = "真实姓名") String realName,
@Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role, @Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role,
@Schema(description = "岗位,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position, @Schema(description = "岗位枚举值ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position,
@Schema(description = "是否必须修改密码") boolean mustChangePassword @Schema(description = "是否必须修改密码") boolean mustChangePassword
) { ) {
public static LoginResponse from(String token, LoginUser loginUser, SysCompany company) { public static LoginResponse from(String token, LoginUser loginUser, SysCompany company) {

View File

@@ -14,7 +14,7 @@ public record UserResponse(
@Schema(description = "用户名,可为空", example = "alpha-admin") String username, @Schema(description = "用户名,可为空", example = "alpha-admin") String username,
@Schema(description = "真实姓名") String realName, @Schema(description = "真实姓名") String realName,
@Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role, @Schema(description = "角色枚举值EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role,
@Schema(description = "岗位,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position, @Schema(description = "岗位枚举值ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position,
@Schema(description = "用户状态枚举值ENABLED启用、DISABLED禁用") UserStatus status, @Schema(description = "用户状态枚举值ENABLED启用、DISABLED禁用") UserStatus status,
@Schema(description = "是否必须修改密码") boolean mustChangePassword @Schema(description = "是否必须修改密码") boolean mustChangePassword
) { ) {

View File

@@ -6,13 +6,9 @@ import lombok.RequiredArgsConstructor;
@Getter @Getter
@RequiredArgsConstructor @RequiredArgsConstructor
@Schema(description = "岗位枚举,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") @Schema(description = "岗位枚举枚举值ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员")
public enum UserPosition { public enum UserPosition {
UPLOADER(1), ANNOTATOR(1), DATA_TRAINER(2), REVIEWER(3), ADMIN(4);
ANNOTATOR(2),
DATA_TRAINER(3),
REVIEWER(4),
ADMIN(5);
private final int level; private final int level;