Unverified Commit e8c198cb authored by samz406's avatar samz406 Committed by GitHub
Browse files

更新项目名时没有做名称唯一性校验

1更新项目名时没有做名称唯一性校验
2 建议将项目表名称设置为唯一索引
parent 1908e6d1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -242,7 +242,11 @@ public class ProjectService extends BaseService{
        if (checkResult != null) {
            return checkResult;
        }

        Project tempProject = projectMapper.queryByName(projectName);
        if (tempProject != null && tempProject.getId() != projectId) {
            putMsg(result, Status.PROJECT_ALREADY_EXISTS, projectName);
            return result;
        }
        project.setName(projectName);
        project.setDesc(desc);
        project.setUpdateTime(new Date());