Browse Source

1、添加代码配置sshkey字段

pull/127/head
chenzhihang 1 year ago
parent
commit
9ac99957ed
2 changed files with 13 additions and 2 deletions
  1. +4
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/CodeConfig.java
  2. +9
    -2
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/CodeConfigDaoMapper.xml

+ 4
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/CodeConfig.java View File

@@ -36,6 +36,9 @@ public class CodeConfig implements Serializable {
@ApiModelProperty(value = "Git密码")
private String gitPassword;

@ApiModelProperty(value = "SSH Key")
private String sshKey;

private String createBy;
/**
* 创建时间
@@ -53,4 +56,5 @@ public class CodeConfig implements Serializable {
* 状态,0失效1生效
*/
private Integer state;

}

+ 9
- 2
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/CodeConfigDaoMapper.xml View File

@@ -3,8 +3,9 @@
<mapper namespace="com.ruoyi.platform.mapper.CodeConfigDao">

<insert id="insert">
insert into code_config(code_repo_name, code_repo_vis, git_url, git_branch, verify_mode, git_user_name, git_password, create_by, create_time, update_by, update_time)
values(#{codeConfig.codeRepoName}, #{codeConfig.codeRepoVis}, #{codeConfig.gitUrl}, #{codeConfig.gitBranch}, #{codeConfig.verifyMode}, #{codeConfig.gitUserName}, #{codeConfig.gitPassword}, #{codeConfig.createBy}, #{codeConfig.createTime}, #{codeConfig.updateBy}, #{codeConfig.updateTime})
insert into code_config(code_repo_name, code_repo_vis, 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}, #{codeConfig.verifyMode}, #{codeConfig.gitUserName}, #{codeConfig.gitPassword},
#{codeConfig.sshKey}, #{codeConfig.createBy}, #{codeConfig.createTime}, #{codeConfig.updateBy}, #{codeConfig.updateTime})
</insert>

<update id="update">
@@ -28,6 +29,12 @@
<if test="codeConfig.gitUserName != null and codeConfig.gitUserName != ''">
git_user_name = #{codeConfig.gitUserName},
</if>
<if test="codeConfig.gitPassword != null and codeConfig.gitPassword != ''">
git_password = #{codeConfig.gitPassword},
</if>
<if test="codeConfig.sshKey != null and codeConfig.sshKey != ''">
ssh_key = #{codeConfig.sshKey},
</if>
<if test="codeConfig.createBy != null and codeConfig.createBy != ''">
create_by = #{codeConfig.createBy},
</if>


Loading…
Cancel
Save