权限前2个阶段代码提交!

This commit is contained in:
2026-03-19 21:23:35 +08:00
parent 072d10d29e
commit 50aa5e2d5d
31 changed files with 1715 additions and 244 deletions

View File

@@ -4,9 +4,7 @@ import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Set;
@Schema(description = "RPC 服务 - Admin 用户 Response DTO")
@Schema(description = "RPC 服务 - 管理后台用户 Response DTO")
@Data
public class AdminUserRespDTO implements VO {
@@ -22,8 +20,8 @@ public class AdminUserRespDTO implements VO {
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long deptId;
@Schema(description = "岗位编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 3]")
private Set<Long> postIds;
@Schema(description = "岗位编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long positionId;
@Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
private String mobile;

View File

@@ -14,7 +14,7 @@ public class ApiConstants {
*
* 注意,需要保证和 spring.application.name 保持一致
*/
public static final String NAME = "system-server";
public static final String NAME = "rdms-system-server";
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/system";

View File

@@ -52,8 +52,10 @@ public interface ErrorCodeConstants {
ErrorCode DEPT_NOT_FOUND = new ErrorCode(1_002_004_002, "当前部门不存在");
ErrorCode DEPT_EXITS_CHILDREN = new ErrorCode(1_002_004_003, "存在子部门,无法删除");
ErrorCode DEPT_PARENT_ERROR = new ErrorCode(1_002_004_004, "不能设置自己为父部门");
ErrorCode DEPT_CODE_DUPLICATE = new ErrorCode(1_002_004_005, "已经存在编码为【{}】的部门");
ErrorCode DEPT_NOT_ENABLE = new ErrorCode(1_002_004_006, "部门({})不处于开启状态,不允许选择");
ErrorCode DEPT_PARENT_IS_CHILD = new ErrorCode(1_002_004_007, "不能设置自己的子部门为父部门");
ErrorCode DEPT_ORG_TYPE_INVALID = new ErrorCode(1_002_004_008, "组织类型({})不合法");
// ========== 岗位模块 1-002-005-000 ==========
ErrorCode POST_NOT_FOUND = new ErrorCode(1_002_005_000, "当前岗位不存在");

View File

@@ -0,0 +1,33 @@
package com.njcn.rdms.module.system.enums.dept;
import java.util.Arrays;
/**
* 组织节点类型枚举
*/
public enum DeptOrgTypeEnum {
COMPANY("company"),
DEPT("dept"),
DIRECTION("direction"),
TEAM("team");
private final String type;
DeptOrgTypeEnum(String type) {
this.type = type;
}
public String getType() {
return type;
}
public static boolean isValid(String type) {
return Arrays.stream(values()).anyMatch(item -> item.type.equals(type));
}
public static String defaultType() {
return DEPT.type;
}
}