Sfoglia il codice sorgente

应用丢失问题

tags/24080901
PoffyZhang 1 anno fa
parent
commit
bc3d1ea469
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  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 Vedi 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…
Annulla
Salva