Browse Source

1、修改代码配置

pull/127/head
chenzhihang 1 year ago
parent
commit
85f06999b8
3 changed files with 24 additions and 25 deletions
  1. +5
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/codeConfig/CodeConfigController.java
  2. +17
    -20
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/CodeConfig.java
  3. +2
    -4
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/CodeConfigDaoMapper.xml

+ 5
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/codeConfig/CodeConfigController.java View File

@@ -28,8 +28,12 @@ public class CodeConfigController extends BaseController {
* @return 查询结果 * @return 查询结果
*/ */
@GetMapping @GetMapping
public GenericsAjaxResult<Page<CodeConfig>> queryByPage(CodeConfig codeConfig, int page, int size) {
public GenericsAjaxResult<Page<CodeConfig>> queryByPage( @RequestParam("page")int page,
@RequestParam("size") int size,
@RequestParam(value = "code_repo_name") String codeRepoName) {
PageRequest pageRequest = PageRequest.of(page,size); PageRequest pageRequest = PageRequest.of(page,size);
CodeConfig codeConfig = new CodeConfig();
codeConfig.setCodeRepoName(codeRepoName);
return genericsSuccess(this.codeConfigService.queryByPage(codeConfig, pageRequest)); return genericsSuccess(this.codeConfigService.queryByPage(codeConfig, pageRequest));
} }




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

@@ -15,46 +15,43 @@ public class CodeConfig implements Serializable {


private Long id; private Long id;


@ApiModelProperty(value = "代码仓库名称")
@ApiModelProperty(name = "code_repo_name",value = "代码仓库名称")
private String codeRepoName; private String codeRepoName;


@ApiModelProperty(value = "代码仓库可见性(1-公开,0-私有)")
@ApiModelProperty(name = "code_repo_vis", value = "代码仓库可见性(1-公开,0-私有)")
private Integer codeRepoVis; private Integer codeRepoVis;


@ApiModelProperty(value = "Git地址")
@ApiModelProperty(name = "git_url", value = "Git地址")
private String gitUrl; private String gitUrl;


@ApiModelProperty(value = "代码分支/Tag")
@ApiModelProperty(name = "git_branch", value = "代码分支/Tag")
private String gitBranch; private String gitBranch;


@ApiModelProperty(value = "验证方式(0-用户名密码,1-SSH-Key)")
@ApiModelProperty(name = "verify_mode", value = "验证方式(0-用户名密码,1-SSH-Key)")
private Integer verifyMode; private Integer verifyMode;


@ApiModelProperty(value = "Git用户名")
@ApiModelProperty(name = "git_user_name", value = "Git用户名")
private String gitUserName; private String gitUserName;


@ApiModelProperty(value = "Git密码")
@ApiModelProperty(name = "git_password", value = "Git密码")
private String gitPassword; private String gitPassword;


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


@ApiModelProperty(name = "create_by", value = "创建者")
private String createBy; private String createBy;
/**
* 创建时间
*/

@ApiModelProperty(name = "create_time", value = "创建时间")
private Date createTime; private Date createTime;
/**
* 更新者
*/

@ApiModelProperty(name = "update_by", value = "更新者")
private String updateBy; private String updateBy;
/**
* 更新时间
*/

@ApiModelProperty(name = "update_time", value = "更新时间")
private Date updateTime; private Date updateTime;
/**
* 状态,0失效1生效
*/

@ApiModelProperty(name = "state", value = "状态,0失效1生效")
private Integer state; private Integer state;


} }

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

@@ -44,12 +44,10 @@
<if test="codeConfig.updateBy != null and codeConfig.updateBy != ''"> <if test="codeConfig.updateBy != null and codeConfig.updateBy != ''">
update_by = #{codeConfig.updateBy}, update_by = #{codeConfig.updateBy},
</if> </if>
<if test="codeConfig.updateTime != null">
update_time = #{codeConfig.updateTime},
</if>
<if test="codeConfig.state != null"> <if test="codeConfig.state != null">
state = #{codeConfig.state}, state = #{codeConfig.state},
</if> </if>
update_time = sysdate()
</set> </set>
where id = #{codeConfig.id} where id = #{codeConfig.id}
</update> </update>
@@ -81,7 +79,7 @@
and id = #{codeConfig.id} and id = #{codeConfig.id}
</if> </if>
<if test="codeConfig.codeRepoName != null and codeConfig.codeRepoName != ''"> <if test="codeConfig.codeRepoName != null and codeConfig.codeRepoName != ''">
and code_repo_name = #{codeConfig.codeRepoName}
and code_repo_name LIKE CONCAT('%', #{codeConfig.codeRepoName}, '%')
</if> </if>
<if test="codeConfig.codeRepoVis != null"> <if test="codeConfig.codeRepoVis != null">
and code_repo_vis = #{codeConfig.codeRepoVis} and code_repo_vis = #{codeConfig.codeRepoVis}


Loading…
Cancel
Save