fix: project name duplicate error (#35)

* feat: update frontend resources

* feat: update jooq model

* fix: project name duplicate error
This commit is contained in:
vran
2022-03-06 10:13:59 +08:00
committed by GitHub
parent f2a7019ec4
commit 1f3aa9e6d9
29 changed files with 2334 additions and 115 deletions

View File

@@ -65,7 +65,7 @@ public class ProjectService {
try {
projectId = projectDao.insertAndReturnId(project);
} catch (DuplicateKeyException e) {
throw DomainErrors.PROJECT_NOT_FOUND.exception();
throw DomainErrors.PROJECT_NAME_DUPLICATE.exception();
}
String newPassword = encryptPassword(request.getDataSource().getPassword()).get();
@@ -122,6 +122,7 @@ public class ProjectService {
return Optional.of(Aes.encryptToBase64Data(password, sysKey.getAesKey()));
}
@Transactional
public void delete(Integer projectId) {
projectDao.updateDeletedById(true, projectId);
projectSyncRuleDao.disableAutoSyncByProjectId(projectId);