1、修改代码配置

This commit is contained in:
chenzhihang 2024-08-29 15:59:52 +08:00
parent 9ac99957ed
commit 85f06999b8
3 changed files with 24 additions and 25 deletions

View File

@ -28,8 +28,12 @@ public class CodeConfigController extends BaseController {
* @return 查询结果
*/
@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);
CodeConfig codeConfig = new CodeConfig();
codeConfig.setCodeRepoName(codeRepoName);
return genericsSuccess(this.codeConfigService.queryByPage(codeConfig, pageRequest));
}

View File

@ -15,46 +15,43 @@ public class CodeConfig implements Serializable {
private Long id;
@ApiModelProperty(value = "代码仓库名称")
@ApiModelProperty(name = "code_repo_name",value = "代码仓库名称")
private String codeRepoName;
@ApiModelProperty(value = "代码仓库可见性(1-公开0-私有)")
@ApiModelProperty(name = "code_repo_vis", value = "代码仓库可见性(1-公开0-私有)")
private Integer codeRepoVis;
@ApiModelProperty(value = "Git地址")
@ApiModelProperty(name = "git_url", value = "Git地址")
private String gitUrl;
@ApiModelProperty(value = "代码分支/Tag")
@ApiModelProperty(name = "git_branch", value = "代码分支/Tag")
private String gitBranch;
@ApiModelProperty(value = "验证方式(0-用户名密码1-SSH-Key)")
@ApiModelProperty(name = "verify_mode", value = "验证方式(0-用户名密码1-SSH-Key)")
private Integer verifyMode;
@ApiModelProperty(value = "Git用户名")
@ApiModelProperty(name = "git_user_name", value = "Git用户名")
private String gitUserName;
@ApiModelProperty(value = "Git密码")
@ApiModelProperty(name = "git_password", value = "Git密码")
private String gitPassword;
@ApiModelProperty(value = "SSH Key")
@ApiModelProperty(name = "ssh_key",value = "SSH Key")
private String sshKey;
@ApiModelProperty(name = "create_by", value = "创建者")
private String createBy;
/**
* 创建时间
*/
@ApiModelProperty(name = "create_time", value = "创建时间")
private Date createTime;
/**
* 更新者
*/
@ApiModelProperty(name = "update_by", value = "更新者")
private String updateBy;
/**
* 更新时间
*/
@ApiModelProperty(name = "update_time", value = "更新时间")
private Date updateTime;
/**
* 状态0失效1生效
*/
@ApiModelProperty(name = "state", value = "状态0失效1生效")
private Integer state;
}

View File

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