From bc3d1ea469ba4b21cd48b5c68b4a7b8849ea1407 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Mon, 31 Jul 2023 14:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E4=B8=A2=E5=A4=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/projectlib/manage/ProjectLibManage.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 811acbc..177679e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -616,6 +616,18 @@ public class ProjectLibManage { .set(Project::getNewest, Boolean.FALSE) .ne(Project::getId, project.getId()) .eq(Project::getProjectCode, project.getProjectCode())); + + List 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;