Reduce queries after successful project creation. (#4901)

This commit is contained in:
zhuangchong 2021-02-27 21:39:21 +08:00 committed by GitHub
parent a388b6853d
commit 139211f3dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,8 +97,7 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectServic
.build(); .build();
if (projectMapper.insert(project) > 0) { if (projectMapper.insert(project) > 0) {
Project insertedProject = projectMapper.queryByName(name); result.put(Constants.DATA_LIST, project);
result.put(Constants.DATA_LIST, insertedProject);
putMsg(result, Status.SUCCESS); putMsg(result, Status.SUCCESS);
} else { } else {
putMsg(result, Status.CREATE_PROJECT_ERROR); putMsg(result, Status.CREATE_PROJECT_ERROR);