diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/codeConfig/CodeConfigController.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/codeConfig/CodeConfigController.java index 6a59902..44bc217 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/codeConfig/CodeConfigController.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/codeConfig/CodeConfigController.java @@ -28,8 +28,12 @@ public class CodeConfigController extends BaseController { * @return 查询结果 */ @GetMapping - public GenericsAjaxResult> queryByPage(CodeConfig codeConfig, int page, int size) { + public GenericsAjaxResult> 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)); } 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 67d5533..e5a0c68 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 @@ -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; } 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 815e0ac..f714f9e 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 @@ -44,12 +44,10 @@ update_by = #{codeConfig.updateBy}, - - update_time = #{codeConfig.updateTime}, - state = #{codeConfig.state}, + update_time = sysdate() where id = #{codeConfig.id} @@ -81,7 +79,7 @@ and id = #{codeConfig.id} - and code_repo_name = #{codeConfig.codeRepoName} + and code_repo_name LIKE CONCAT('%', #{codeConfig.codeRepoName}, '%') and code_repo_vis = #{codeConfig.codeRepoVis}