Browse Source

应用丢失问题

master
PoffyZhang 1 year ago
parent
commit
bc3d1ea469
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java

+ 12
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -616,6 +616,18 @@ public class ProjectLibManage {
.set(Project::getNewest, Boolean.FALSE)
.ne(Project::getId, project.getId())
.eq(Project::getProjectCode, project.getProjectCode()));

List<ProjectApplication> apps = projectApplicationService.list(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectId, oldProject.getId()));
if(CollUtil.isNotEmpty(apps)){
apps = apps.stream().map(app -> {
app.setProjectVersion(project.getVersion());
app.setProjectId(project.getId());
app.setId(null);
return app;
}).collect(Collectors.toList());
projectApplicationService.saveBatch(apps);
}
}

return project;


Loading…
Cancel
Save