Browse Source

完成了对repo表的字段更改

李英俊ya 1 month ago
parent
commit
2cb5d62dac

+ 16 - 27
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRepo.java

@@ -19,7 +19,7 @@ public class SysRepo extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
-    /** 仓库Id */
+    /** 仓库文件Id */
     private Long repoId;
 
     private Long createBy;
@@ -27,8 +27,8 @@ public class SysRepo extends BaseEntity
     @Excel(name = "名称")
     private String repoName;
 
-    /** 类别(目录、文件) */
-    @Excel(name = "类别", readConverterExp = "目录、文件")
+    /** 类别(文件docx、xls、jpg) */
+    @Excel(name = "类别", readConverterExp = "文件docx、xls、jpg")
     private String repoType;
 
     /** 状态(私密、公开) */
@@ -40,12 +40,11 @@ public class SysRepo extends BaseEntity
     private Long parentId;
 
     /** 等级(一级只能是目录类型) */
-    @Excel(name = "等级", readConverterExp = "一级只能是目录类型")
-    private Long repoLevel;
+    private Long groupId;
 
     /** 描述 */
-    @Excel(name = "描述")
-    private String description;
+    @Excel(name = "版本")
+    private String version;
 
     /** 是否删除 */
     @Excel(name = "是否删除")
@@ -101,24 +100,24 @@ public class SysRepo extends BaseEntity
         return parentId;
     }
 
-    public void setRepoLevel(Long repoLevel) 
+    public void setGroupId(Long groupId)
     {
-        this.repoLevel = repoLevel;
+        this.groupId = groupId;
     }
 
-    public Long getRepoLevel() 
+    public Long getGroupId()
     {
-        return repoLevel;
+        return groupId;
     }
 
-    public void setDescription(String description) 
+    public void setVersion(String version)
     {
-        this.description = description;
+        this.version = version;
     }
 
-    public String getDescription() 
+    public String getVersion()
     {
-        return description;
+        return version;
     }
 
     public void setIsDelete(Integer isDelete) 
@@ -139,16 +138,6 @@ public class SysRepo extends BaseEntity
         this.url = url;
     }
 
-    public List<SysMenu> getChildren()
-    {
-        return children;
-    }
-
-    public void setChildren(List<SysMenu> children)
-    {
-        this.children = children;
-    }
-
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -161,8 +150,8 @@ public class SysRepo extends BaseEntity
             .append("createTime", getCreateTime())
             .append("updateTime", getUpdateTime())
             .append("parentId", getParentId())
-            .append("repoLevel", getRepoLevel())
-            .append("description", getDescription())
+            .append("groupId", getGroupId())
+            .append("version", getVersion())
             .append("isDelete", getIsDelete())
             .append("url", getIsDelete())
             .toString();

+ 11 - 11
ruoyi-system/src/main/resources/mapper/system/SysRepoMapper.xml

@@ -14,14 +14,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_Time"    />
         <result property="updateTime"    column="update_Time"    />
         <result property="parentId"    column="parent_id"    />
-        <result property="repoLevel"    column="repo_level"    />
-        <result property="description"    column="description"    />
+        <result property="groupId"    column="group_id"    />
+        <result property="version"    column="version"    />
         <result property="isDelete"    column="is_delete"    />
         <result property="url"    column="url"    />
     </resultMap>
 
     <sql id="selectSysRepoVo">
-        select repo_Id, repo_name, create_by, update_by, repo_type, repo_status, create_Time, update_Time, parent_id, repo_level, description, is_delete, url from sys_repo
+        select repo_Id, repo_name, create_by, update_by, repo_type, repo_status, create_Time, update_Time, parent_id, group_id, version, is_delete, url from sys_repo
     </sql>
 
     <select id="selectSysRepoList" parameterType="SysRepo" resultMap="SysRepoResult">
@@ -33,8 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null "> and create_Time = #{createTime}</if>
             <if test="updateTime != null "> and update_Time = #{updateTime}</if>
             <if test="parentId != null "> and parent_id = #{parentId}</if>
-            <if test="repoLevel != null "> and repo_level = #{repoLevel}</if>
-            <if test="description != null  and description != ''"> and description = #{description}</if>
+            <if test="groupId != null "> and group_id = #{groupId}</if>
+            <if test="version != null  and description != ''"> and version = #{version}</if>
             <if test="isDelete != null "> and is_delete = #{isDelete}</if>
             <if test="url != null "> and url = #{isDelete}</if>
         </where>
@@ -56,8 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_Time,</if>
             <if test="updateTime != null">update_Time,</if>
             <if test="parentId != null">parent_id,</if>
-            <if test="repoLevel != null">repo_level,</if>
-            <if test="description != null">description,</if>
+            <if test="groupId != null">group_id,</if>
+            <if test="version != null">version,</if>
             <if test="isDelete != null">is_delete,</if>
             <if test="url != null">url,</if>
          </trim>
@@ -70,8 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="parentId != null">#{parentId},</if>
-            <if test="repoLevel != null">#{repoLevel},</if>
-            <if test="description != null">#{description},</if>
+            <if test="groupId != null">#{groupId},</if>
+            <if test="verion != null">#{version},</if>
             <if test="isDelete != null">#{isDelete},</if>
             <if test="url != null">#{url},</if>
          </trim>
@@ -88,8 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_Time = #{createTime},</if>
             <if test="updateTime != null">update_Time = #{updateTime},</if>
             <if test="parentId != null">parent_id = #{parentId},</if>
-            <if test="repoLevel != null">repo_level = #{repoLevel},</if>
-            <if test="description != null">description = #{description},</if>
+            <if test="groupId != null">group_id = #{groupId},</if>
+            <if test="version != null">version = #{version},</if>
             <if test="isDelete != null">is_delete = #{isDelete},</if>
             <if test="url != null">url = #{url},</if>
         </trim>

+ 41 - 0
sql/sys_repo.sql

@@ -0,0 +1,41 @@
+/*
+ Navicat MySQL Data Transfer
+
+ Source Server         : bishe
+ Source Server Type    : MySQL
+ Source Server Version : 50741
+ Source Host           : localhost:3306
+ Source Schema         : ry-vue
+
+ Target Server Type    : MySQL
+ Target Server Version : 50741
+ File Encoding         : 65001
+
+ Date: 19/05/2025 15:18:45
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for sys_repo
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_repo`;
+CREATE TABLE `sys_repo`  (
+  `repo_Id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `repo_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
+  `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
+  `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人',
+  `repo_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件类型(docx、xls等)',
+  `repo_status` enum('Private','Public') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '状态(私密、公开)',
+  `create_Time` datetime(0) DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_Time` datetime(0) DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更改时间',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '父级',
+  `group_id` bigint(20) NOT NULL COMMENT '文件组别',
+  `version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件版本',
+  `is_delete` tinyint(4) DEFAULT 0 COMMENT '是否删除',
+  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件地址',
+  PRIMARY KEY (`repo_Id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+SET FOREIGN_KEY_CHECKS = 1;