|
|
@@ -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; |
|
|
|