From ec65a70e6eeb8e934c4d022b1e1707844af45f6a Mon Sep 17 00:00:00 2001 From: chenzhihang <709011834@qq.com> Date: Tue, 13 May 2025 10:53:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/platform/domain/CodeConfig.java | 3 +++ .../mapper/managementPlatform/CodeConfigDaoMapper.xml | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/CodeConfig.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/CodeConfig.java index e5a0c680..b61835ef 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/CodeConfig.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/CodeConfig.java @@ -21,6 +21,9 @@ public class CodeConfig implements Serializable { @ApiModelProperty(name = "code_repo_vis", value = "代码仓库可见性(1-公开,0-私有)") private Integer codeRepoVis; + @ApiModelProperty(name = "is_public", value = "1-公开,0-私有)") + private Integer isPublic; + @ApiModelProperty(name = "git_url", value = "Git地址") private String gitUrl; diff --git a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/CodeConfigDaoMapper.xml b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/CodeConfigDaoMapper.xml index 9ae12b5b..90a1b993 100644 --- a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/CodeConfigDaoMapper.xml +++ b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/CodeConfigDaoMapper.xml @@ -3,9 +3,9 @@ - insert into code_config(code_repo_name, code_repo_vis, git_url, git_branch, verify_mode, git_user_name, + insert into code_config(code_repo_name, is_public, git_url, git_branch, verify_mode, git_user_name, git_password, ssh_key, create_by, create_time, update_by, update_time) - values (#{codeConfig.codeRepoName}, #{codeConfig.codeRepoVis}, #{codeConfig.gitUrl}, #{codeConfig.gitBranch}, + values (#{codeConfig.codeRepoName}, #{codeConfig.isPublic}, #{codeConfig.gitUrl}, #{codeConfig.gitBranch}, #{codeConfig.verifyMode}, #{codeConfig.gitUserName}, #{codeConfig.gitPassword}, #{codeConfig.sshKey}, #{codeConfig.createBy}, #{codeConfig.createTime}, #{codeConfig.updateBy}, #{codeConfig.updateTime}) @@ -17,8 +17,8 @@ code_repo_name = #{codeConfig.codeRepoName}, - - code_repo_vis = #{codeConfig.codeRepoVis}, + + is_public = #{codeConfig.isPublic}, git_url = #{codeConfig.gitUrl}, @@ -78,6 +78,7 @@ state = 1 + and code_repo_vis = 1 and id = #{codeConfig.id} @@ -85,7 +86,7 @@ and code_repo_name LIKE CONCAT('%', #{codeConfig.codeRepoName}, '%') - and code_repo_vis = #{codeConfig.codeRepoVis} + and is_public = #{codeConfig.isPublic} and git_url = #{codeConfig.gitUrl} From 7998332b6c58f29c5071990042991e2ca97dbb1a Mon Sep 17 00:00:00 2001 From: chenzhihang <709011834@qq.com> Date: Tue, 13 May 2025 11:00:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=B6=E4=BD=9C?= =?UTF-8?q?=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/platform/service/impl/ImageServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java index 0c52a9bb..30944e04 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java @@ -466,7 +466,7 @@ public class ImageServiceImpl implements ImageService { imageVo.setValue(resultMap.get("imageName")); imageVo.setVersion(String.valueOf(imageVersion.getId())); - resultMap.put("id", String.valueOf(oldImage.getId())); + resultMap.put("id", String.valueOf(image.getId())); resultMap.put("version", String.valueOf(imageVersion.getId())); resultMap.put("value",resultMap.get("imageName"));