Browse Source

Merge remote-tracking branch 'origin/feat_file_compare_manger' into feat_wangshuo

wangshuo 1 month ago
parent
commit
36da6553be

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRepoController.java

@@ -98,7 +98,7 @@ public class SysRepoController extends BaseController
             sysRepoHistory.setRepoId(sysRepo.getRepoId());
             sysRepoHistory.setUrl(sysRepo.getUrl());
             sysRepoHistory.setUploadBy(sysRepo.getUpdateBy());
-            sysRepoHistory.setFileVersion("v0.0.1");
+            sysRepoHistory.setVersion("v0.0.1");
             if(sysRepoHistoryService.insertSysRepoHistory(sysRepoHistory)<1){
                 return AjaxResult.error("文件插入失败");
             }

+ 6 - 6
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRepoHistory.java

@@ -25,7 +25,7 @@ public class SysRepoHistory extends BaseEntity
     private String uploadBy;
 
     /** 版本号 */
-    private String fileVersion;
+    private String version;
 
     /** url */
     private String url;
@@ -63,14 +63,14 @@ public class SysRepoHistory extends BaseEntity
         return uploadBy;
     }
 
-    public void setFileVersion(String fileVersion) 
+    public void setVersion(String version)
     {
-        this.fileVersion = fileVersion;
+        this.version = version;
     }
 
-    public String getFileVersion() 
+    public String getVersion()
     {
-        return fileVersion;
+        return version;
     }
 
     public void setUrl(String url) 
@@ -97,7 +97,7 @@ public class SysRepoHistory extends BaseEntity
             .append("hId", gethId())
             .append("repoId", getRepoId())
             .append("uploadBy", getUploadBy())
-            .append("fileVersion", getFileVersion())
+            .append("version", getVersion())
             .append("url", getUrl())
             .append("fileName", getFileName())
             .toString();

+ 6 - 6
ruoyi-system/src/main/resources/mapper/system/SysRepoHistoryMapper.xml

@@ -8,13 +8,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="hId"    column="h_id"    />
         <result property="repoId"    column="repo_id"    />
         <result property="uploadBy"    column="upload_by"    />
-        <result property="fileVersion"    column="file_version"    />
+        <result property="version"    column="version"    />
         <result property="url"    column="url"    />
         <result property="fileName"    column="file_name"    />
     </resultMap>
 
     <sql id="selectSysRepoHistoryVo">
-        select h_id, repo_id, upload_by, file_version, url, file_name from sys_repo_history
+        select h_id, repo_id, upload_by, version, url, file_name from sys_repo_history
     </sql>
 
     <select id="selectSysRepoHistoryList" parameterType="SysRepoHistory" resultMap="SysRepoHistoryResult">
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="repoId != null "> and repo_id = #{repoId}</if>
             <if test="uploadBy != null  and uploadBy != ''"> and upload_by = #{uploadBy}</if>
-            <if test="fileVersion != null  and fileVersion != ''"> and file_version = #{fileVersion}</if>
+            <if test="version != null  and version != ''"> and version = #{version}</if>
             <if test="url != null  and url != ''"> and url = #{url}</if>
             <if test="fileName != null  and fileName != ''"> and file_name = #{fileName}</if>
         </where>
@@ -38,14 +38,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="repoId != null">repo_id,</if>
             <if test="uploadBy != null and uploadBy != ''">upload_by,</if>
-            <if test="fileVersion != null and fileVersion != ''">file_version,</if>
+            <if test="version != null and version != ''">version,</if>
             <if test="url != null and url != ''">url,</if>
             <if test="fileName != null  and fileName != ''">file_name,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="repoId != null">#{repoId},</if>
             <if test="uploadBy != null and uploadBy != ''">#{uploadBy},</if>
-            <if test="fileVersion != null and fileVersion != ''">#{fileVersion},</if>
+            <if test="version != null and version != ''">#{version},</if>
             <if test="url != null and url != ''">#{url},</if>
             <if test="fileName != null  and fileName != ''">#{fileName},</if>
          </trim>
@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="repoId != null">repo_id = #{repoId},</if>
             <if test="uploadBy != null and uploadBy != ''">upload_by = #{uploadBy},</if>
-            <if test="fileVersion != null and fileVersion != ''">file_version = #{fileVersion},</if>
+            <if test="version != null and version != ''">version = #{version},</if>
             <if test="url != null and url != ''">url = #{url},</if>
             <if test="fileName != null  and fileName != ''">file_name = #{fileName},</if>
         </trim>

+ 2 - 2
sql/sys_repo_history.sql

@@ -11,7 +11,7 @@
  Target Server Version : 50741
  File Encoding         : 65001
 
- Date: 20/05/2025 10:08:37
+ Date: 20/05/2025 13:42:27
 */
 
 SET NAMES utf8mb4;
@@ -25,7 +25,7 @@ CREATE TABLE `sys_repo_history`  (
   `h_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '历史记录ID',
   `repo_id` int(11) NOT NULL COMMENT '所属仓库文件ID',
   `upload_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上传人',
-  `file_version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件版本',
+  `version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件版本',
   `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '路径地址',
   `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件名',
   PRIMARY KEY (`h_id`) USING BTREE