v 1.0
1. 新增用户与部门,一对多的关系; 2. 新增管理多部门用户,如果有为公司的多个部门可以进行选择登录(选择后,直到下次变更访问公司前,只能访问此次选择公的业务数据,使用 company_id 控制,后续补充此数据权限的实现); 3. sql 转化工具修复,现在可以正确的对 mysql 进行不同数据库实例的转化了; 4. 所有表格主键,修改为分布式 Id 实现; 5. 补全在初始版本中没有被纳入的其他预制功能模块
This commit is contained in:
@@ -22,4 +22,10 @@ public class DeptRespDTO {
|
||||
@Schema(description = "部门状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status; // 参见 CommonStatusEnum 枚举
|
||||
|
||||
@Schema(description = "是否公司", example = "false")
|
||||
private Boolean isCompany;
|
||||
|
||||
@Schema(description = "是否集团", example = "false")
|
||||
private Boolean isGroup;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.fhs.core.trans.vo.VO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Schema(description = "RPC 服务 - Admin 用户 Response DTO")
|
||||
@@ -19,8 +20,8 @@ public class AdminUserRespDTO implements VO {
|
||||
@Schema(description = "帐号状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status; // 参见 CommonStatusEnum 枚举
|
||||
|
||||
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long deptId;
|
||||
@Schema(description = "部门编号列表", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private List<Long> deptIds;
|
||||
|
||||
@Schema(description = "岗位编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 3]")
|
||||
private Set<Long> postIds;
|
||||
|
||||
@@ -172,6 +172,6 @@ public interface ErrorCodeConstants {
|
||||
// ========== 站内信发送 1-002-028-000 ==========
|
||||
ErrorCode NOTIFY_SEND_TEMPLATE_PARAM_MISS = new ErrorCode(1_002_028_000, "模板参数({})缺失");
|
||||
|
||||
// ========== 用户-租户关系 ==========
|
||||
ErrorCode USER_TENANT_NOT_EXISTS = new ErrorCode(1_002_028_000, "用户-租户关系不存在");
|
||||
// ========== 用户与部门关系 1-002-029-000 ==========
|
||||
ErrorCode USER_DEPT_NOT_EXISTS = new ErrorCode(1_002_029_000, "用户与部门关系不存在");
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 角色标识枚举
|
||||
*/
|
||||
@@ -13,7 +15,7 @@ public enum RoleCodeEnum {
|
||||
|
||||
SUPER_ADMIN("super_admin", "超级管理员"),
|
||||
TENANT_ADMIN("tenant_admin", "租户管理员"),
|
||||
CRM_ADMIN("crm_admin", "CRM 管理员"); // CRM 系统专用
|
||||
CRM_ADMIN("crm_admin", "CRM 管理员");
|
||||
;
|
||||
|
||||
/**
|
||||
@@ -29,4 +31,9 @@ public enum RoleCodeEnum {
|
||||
return ObjectUtils.equalsAny(code, SUPER_ADMIN.getCode());
|
||||
}
|
||||
|
||||
// 是否存在管理员角色编码
|
||||
public static boolean isAdmin(String code) {
|
||||
return ObjectUtils.equalsAny(code, Arrays.stream(RoleCodeEnum.values()).map(RoleCodeEnum::getCode).toArray(String[]::new));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user