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();
if (projectMapper.insert(project) > 0) {
Project insertedProject = projectMapper.queryByName(name);
result.put(Constants.DATA_LIST, insertedProject);
result.put(Constants.DATA_LIST, project);
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, Status.CREATE_PROJECT_ERROR);