This commit is contained in:
2025-12-02 13:21:18 +08:00
parent fab8c13cb3
commit ee6dd64f98
192 changed files with 25783 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.xyzh</groupId>
<artifactId>common</artifactId>
<version>1.0.0</version>
</parent>
<groupId>org.xyzh.common</groupId>
<artifactId>common-dto</artifactId>
<version>${urban-lifeline.version}</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
</properties>
<dependencies>
<!-- Existing dependencies -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,44 @@
package org.xyzh.common.dto;
import java.io.Serializable;
import java.util.Date;
import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
@Schema(description = "基础数据传输对象")
public class BaseDTO implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "操作流水号")
private String optsn;
@Schema(description = "创建人")
private String creator;
@Schema(description = "更新人")
private String updater;
@Schema(description = "部门路径")
private String deptPath;
@Schema(description = "备注")
private String remark;
@Schema(description = "创建时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Schema(description = "更新时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@Schema(description = "删除时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date deleteTime;
@Schema(description = "是否已删除", defaultValue = "false")
private Boolean deleted = false;
}

View File

@@ -0,0 +1,45 @@
package org.xyzh.common.dto.sys;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
/**
* @description 系统访问控制列表DTO
* @filename TbSysAclDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统访问控制列表DTO")
public class TbSysAclDTO extends BaseDTO {
@Schema(description = "权限ID")
private String aclId;
@Schema(description = "对象类型article/file/course/...")
private String objectType;
@Schema(description = "对象ID")
private String objectId;
@Schema(description = "主体类型user/dept/role")
private String principalType;
@Schema(description = "主体ID")
private String principalId;
@Schema(description = "当主体为role且限定到某部门时的部门ID支持“某部门的某角色”")
private String principalDeptId;
@Schema(description = "权限位1读 2写 4执行")
private Integer permission;
@Schema(description = "允许或显式拒绝", defaultValue = "true")
private Boolean allow = true;
@Schema(description = "是否包含子级对dept/role生效", defaultValue = "false")
private Boolean includeDescendants = false;
}

View File

@@ -0,0 +1,43 @@
package org.xyzh.common.dto.sys;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
/**
* @description ACL 策略表:定义对象类型的层级可见/可编辑规则
* @filename 系统权限策略DTO
* @author yslg
* @copyright yslg
* @since 2025-11-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统访问控制策略DTO")
public class TbSysAclPolicyDTO extends BaseDTO {
@Schema(description = "策略ID")
private String policyId;
@Schema(description = "策略名称")
private String name;
@Schema(description = "对象类型article/file/course/..")
private String objectType;
@Schema(description = "编辑层级规则parent_only/parent_or_same_admin/owner_only/none")
private String editHierarchyRule;
@Schema(description = "可见层级规则 children_all/children_specified/none")
private String viewHierarchyRule;
@Schema(description = "默认权限无显式ACL时应用", defaultValue = "0")
private Integer defaultPermission=0;
@Schema(description = "默认是否允许", defaultValue = "true")
private boolean defaultAllow=true;
@Schema(description = "是否默认应用到子级", defaultValue = "true")
private boolean applyToChildren=true;
}

View File

@@ -0,0 +1,61 @@
package org.xyzh.common.dto.sys;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import com.alibaba.fastjson2.JSONObject;
/**
* @description 系统配置DTO
* @filename TbSysConfigDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统配置DTO")
public class TbSysConfigDTO extends BaseDTO {
// optsn、creator、updater、deptPath、remark、createTime、updateTime、deleteTime、deleted 继承自BaseDTO
@Schema(description = "配置ID")
private String configId;
@Schema(description = "配置键")
private String key;
@Schema(description = "配置名称")
private String name;
@Schema(description = "配置值")
private String value;
@Schema(description = "数据类型(String, Integer, Boolean, Float, Double)")
private String configType;
@Schema(description = "配置渲染类型(select, input, textarea, checkbox, radio, switch)")
private String renderType;
@Schema(description = "配置描述")
private String description;
@Schema(description = "正则表达式校验规则(JSON)")
private JSONObject re;
@Schema(description = "可选项(JSON)render_type为select、checkbox、radio时使用")
private JSONObject options;
@Schema(description = "配置组")
private String group;
@Schema(description = "模块id")
private String moduleId;
@Schema(description = "配置顺序")
private Integer orderNum;
@Schema(description = "配置状态 0:启用 1:禁用", defaultValue = "0")
private Integer status = 0;
}

View File

@@ -0,0 +1,30 @@
package org.xyzh.common.dto.sys;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
/**
* @description 系统部门DTO
* @filename TbSysDeptDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统部门DTO")
public class TbSysDeptDTO extends BaseDTO {
@Schema(description = "部门ID")
private String deptId;
@Schema(description = "部门名称")
private String name;
@Schema(description = "父级部门ID")
private String parentId;
@Schema(description = "部门描述")
private String description;
}

View File

@@ -0,0 +1,25 @@
package org.xyzh.common.dto.sys;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
/**
* @description 系统部门角色关系DTO
* @filename TbSysDeptRoleDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统部门角色关系DTO")
public class TbSysDeptRoleDTO extends BaseDTO {
@Schema(description = "部门ID")
private String deptId;
@Schema(description = "角色ID")
private String roleId;
}

View File

@@ -0,0 +1,29 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统模块DTO
* @filename TbSysModuleDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统模块DTO")
public class TbSysModuleDTO extends BaseDTO {
@Schema(description = "模块ID")
private String moduleId;
@Schema(description = "模块名称")
private String name;
@Schema(description = "模块描述")
private String description;
}

View File

@@ -0,0 +1,37 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统权限DTO
* @filename TbSysPermissionDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统权限DTO")
public class TbSysPermissionDTO extends BaseDTO {
@Schema(description = "权限ID")
private String permissionId;
@Schema(description = "权限名称")
private String name;
@Schema(description = "权限代码")
private String code;
@Schema(description = "权限描述")
private String description;
@Schema(description = "模块ID")
private String moduleId;
@Schema(description = "状态")
private String status;
}

View File

@@ -0,0 +1,37 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统角色DTO
* @filename TbSysRoleDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统角色DTO")
public class TbSysRoleDTO extends BaseDTO {
@Schema(description = "角色ID")
private String roleId;
@Schema(description = "角色名称")
private String name;
@Schema(description = "角色描述")
private String description;
@Schema(description = "角色作用域 global 全局角色, dept 部门角色")
private String scope;
@Schema(description = "所属部门ID")
private String ownerDeptId;
@Schema(description = "角色状态 true 有效, false 无效")
private boolean status;
}

View File

@@ -0,0 +1,25 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统角色权限关系DTO
* @filename TbSysRolePermissionDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统角色权限关系DTO")
public class TbSysRolePermissionDTO extends BaseDTO {
@Schema(description = "角色ID")
private String roleId;
@Schema(description = "权限ID")
private String permissionId;
}

View File

@@ -0,0 +1,44 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统用户DTO
* @filename TbSysUserDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统用户DTO")
public class TbSysUserDTO extends BaseDTO {
@Schema(description = "用户ID")
private String userId;
@Schema(description = "用户名")
private String username;
@Schema(description = "密码")
private String password;
@Schema(description = "邮箱")
private String email;
@Schema(description = "手机")
private String phone;
@Schema(description = "微信ID")
private String wechatId;
@Schema(description = "用户状态")
private String status;
@Schema(description = "用户类型")
private String userType;
}

View File

@@ -0,0 +1,46 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统用户信息DTO
* @filename TbSysUserInfoDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统用户信息DTO")
public class TbSysUserInfoDTO extends BaseDTO {
@Schema(description = "用户ID")
private String userId;
@Schema(description = "头像")
private String avatar;
@Schema(description = "性别")
private Integer gender;
@Schema(description = "")
private String familyName;
@Schema(description = "")
private String givenName;
@Schema(description = "全名")
private String fullName;
@Schema(description = "等级")
private Integer level;
@Schema(description = "身份证号")
private String idCard;
@Schema(description = "地址")
private String address;
}

View File

@@ -0,0 +1,26 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统用户角色关系DTO
* @filename TbSysUserRoleDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统用户角色关系DTO")
public class TbSysUserRoleDTO extends BaseDTO {
@Schema(description = "用户ID")
private String userId;
@Schema(description = "角色ID")
private String roleId;
}

View File

@@ -0,0 +1,50 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统视图DTO
* @filename TbSysViewDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统视图DTO")
public class TbSysViewDTO extends BaseDTO {
@Schema(description = "视图ID")
private String viewId;
@Schema(description = "视图名称")
private String name;
@Schema(description = "父视图ID")
private String parentId;
@Schema(description = "URL")
private String url;
@Schema(description = "组件")
private String component;
@Schema(description = "图标")
private String icon;
@Schema(description = "类型")
private Integer type;
@Schema(description = "布局")
private String layout;
@Schema(description = "排序")
private Integer orderNum;
@Schema(description = "描述")
private String description;
}

View File

@@ -0,0 +1,26 @@
package org.xyzh.common.dto.sys;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.xyzh.common.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @description 系统视图权限关系DTO
* @filename TbSysViewPermissionDTO.java
* @author yslg
* @copyright yslg
* @since 2025-11-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统视图权限关系DTO")
public class TbSysViewPermissionDTO extends BaseDTO {
@Schema(description = "视图ID")
private String viewId;
@Schema(description = "权限ID")
private String permissionId;
}

View File

@@ -0,0 +1,52 @@
package org.xyzh.common.vo;
import java.io.Serializable;
import java.util.Date;
import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @description 基础视图对象
* @filename BaseVO.java
* @author yslg
* @copyright yslg
* @since 2025-11-05
*/
@Data
@Schema(description = "基础视图对象")
public class BaseVO implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "操作流水号")
private String optsn;
@Schema(description = "创建人")
private String creator;
@Schema(description = "更新人")
private String updater;
@Schema(description = "部门路径")
private String deptPath;
@Schema(description = "备注")
private String remark;
@Schema(description = "创建时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Schema(description = "更新时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@Schema(description = "删除时间", format = "date-time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date deleteTime;
@Schema(description = "是否已删除", defaultValue = "false")
private Boolean deleted = false;
}