Browse Source

优化代码配置,设置仓库名称唯一性

pull/127/head
chenzhihang 1 year ago
parent
commit
48e05b0397
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/CodeConfigServiceImpl.java

+ 1
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/CodeConfigServiceImpl.java View File

@@ -54,7 +54,7 @@ public class CodeConfigServiceImpl implements CodeConfigService {
@Override @Override
public CodeConfig update(CodeConfig codeConfig) { public CodeConfig update(CodeConfig codeConfig) {
Long id = this.codeConfigDao.queryByCodeRepoName(codeConfig.getCodeRepoName()); Long id = this.codeConfigDao.queryByCodeRepoName(codeConfig.getCodeRepoName());
if(id != null){
if(id != null && !id.equals(codeConfig.getId())){
throw new IllegalStateException("代码仓库名称已存在"); throw new IllegalStateException("代码仓库名称已存在");
} }




Loading…
Cancel
Save