From 9483bea005d27391f2d2cc3b394c7a6a460283c7 Mon Sep 17 00:00:00 2001 From: wh Date: Thu, 23 Apr 2026 12:27:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88uplaoder=20=E5=B2=97=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/labelsys/backend/context/LoginUser.java | 2 +- .../labelsys/backend/dto/request/CreateUserRequest.java | 2 +- .../backend/dto/request/UpdateUserAssignmentRequest.java | 2 +- .../backend/dto/response/CurrentUserResponse.java | 2 +- .../com/labelsys/backend/dto/response/LoginResponse.java | 2 +- .../com/labelsys/backend/dto/response/UserResponse.java | 2 +- .../java/com/labelsys/backend/enums/UserPosition.java | 8 ++------ 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/labelsys/backend/context/LoginUser.java b/src/main/java/com/labelsys/backend/context/LoginUser.java index 92f883e..7d1d124 100644 --- a/src/main/java/com/labelsys/backend/context/LoginUser.java +++ b/src/main/java/com/labelsys/backend/context/LoginUser.java @@ -16,7 +16,7 @@ public record LoginUser( @Schema(description = "用户名,可为空", example = "alpha-reviewer") String username, @Schema(description = "真实姓名") String realName, @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 = "会话版本") Integer sessionVersion ) { diff --git a/src/main/java/com/labelsys/backend/dto/request/CreateUserRequest.java b/src/main/java/com/labelsys/backend/dto/request/CreateUserRequest.java index aaca155..42bc05e 100644 --- a/src/main/java/com/labelsys/backend/dto/request/CreateUserRequest.java +++ b/src/main/java/com/labelsys/backend/dto/request/CreateUserRequest.java @@ -12,6 +12,6 @@ public record CreateUserRequest( @Schema(description = "用户名,前端展示用,可为空", example = "alpha-admin") String username, @Schema(description = "真实姓名") @NotBlank(message = "不能为空") String realName, @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 ) { } diff --git a/src/main/java/com/labelsys/backend/dto/request/UpdateUserAssignmentRequest.java b/src/main/java/com/labelsys/backend/dto/request/UpdateUserAssignmentRequest.java index 291777d..6e050dd 100644 --- a/src/main/java/com/labelsys/backend/dto/request/UpdateUserAssignmentRequest.java +++ b/src/main/java/com/labelsys/backend/dto/request/UpdateUserAssignmentRequest.java @@ -8,6 +8,6 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "修改员工角色岗位请求") public record UpdateUserAssignmentRequest( @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 ) { } diff --git a/src/main/java/com/labelsys/backend/dto/response/CurrentUserResponse.java b/src/main/java/com/labelsys/backend/dto/response/CurrentUserResponse.java index 5d3e31e..5f5514f 100644 --- a/src/main/java/com/labelsys/backend/dto/response/CurrentUserResponse.java +++ b/src/main/java/com/labelsys/backend/dto/response/CurrentUserResponse.java @@ -15,7 +15,7 @@ public record CurrentUserResponse( @Schema(description = "用户名,可为空", example = "alpha-admin") String username, @Schema(description = "真实姓名") String realName, @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 ) { public static CurrentUserResponse from(LoginUser loginUser) { diff --git a/src/main/java/com/labelsys/backend/dto/response/LoginResponse.java b/src/main/java/com/labelsys/backend/dto/response/LoginResponse.java index 8cc06e1..01d4617 100644 --- a/src/main/java/com/labelsys/backend/dto/response/LoginResponse.java +++ b/src/main/java/com/labelsys/backend/dto/response/LoginResponse.java @@ -14,7 +14,7 @@ public record LoginResponse( @Schema(description = "用户名,可为空", example = "alpha-admin") String username, @Schema(description = "真实姓名") String realName, @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 ) { public static LoginResponse from(String token, LoginUser loginUser, SysCompany company) { diff --git a/src/main/java/com/labelsys/backend/dto/response/UserResponse.java b/src/main/java/com/labelsys/backend/dto/response/UserResponse.java index ca9bb46..6cc9148 100644 --- a/src/main/java/com/labelsys/backend/dto/response/UserResponse.java +++ b/src/main/java/com/labelsys/backend/dto/response/UserResponse.java @@ -14,7 +14,7 @@ public record UserResponse( @Schema(description = "用户名,可为空", example = "alpha-admin") String username, @Schema(description = "真实姓名") String realName, @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 = "是否必须修改密码") boolean mustChangePassword ) { diff --git a/src/main/java/com/labelsys/backend/enums/UserPosition.java b/src/main/java/com/labelsys/backend/enums/UserPosition.java index 87f1f8b..3681151 100644 --- a/src/main/java/com/labelsys/backend/enums/UserPosition.java +++ b/src/main/java/com/labelsys/backend/enums/UserPosition.java @@ -6,13 +6,9 @@ import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor -@Schema(description = "岗位枚举,枚举值:UPLOADER上传者、ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") +@Schema(description = "岗位枚举,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") public enum UserPosition { - UPLOADER(1), - ANNOTATOR(2), - DATA_TRAINER(3), - REVIEWER(4), - ADMIN(5); + ANNOTATOR(1), DATA_TRAINER(2), REVIEWER(3), ADMIN(4); private final int level;