|
|
@@ -275,9 +275,10 @@ public class ProjectLibManage { |
|
|
|
Boolean isApp = Objects.nonNull(projectDto.getIncludeApplication()) && CommonEnum.YES.getCode().equals(projectDto.getIncludeApplication()) |
|
|
|
? Boolean.TRUE : Boolean.FALSE; |
|
|
|
//采取批量删除 批量添加的方式 |
|
|
|
Integer version = Objects.nonNull(project.getVersion()) ? project.getVersion() : 1; |
|
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectCode,project.getProjectCode()) |
|
|
|
.eq(ProjectApplication::getProjectVersion,project.getVersion())); |
|
|
|
.eq(ProjectApplication::getProjectVersion,version)); |
|
|
|
if (isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())) { |
|
|
|
Project finalProject = project; |
|
|
|
List<ProjectApplication> applications = projectDto.getApplicationList().stream().map(application -> { |
|
|
@@ -288,7 +289,7 @@ public class ProjectLibManage { |
|
|
|
projectApplication.setProjectCode(finalProject.getProjectCode()); |
|
|
|
projectApplication.setBuildOrgCode(finalProject.getBuildOrgCode()); |
|
|
|
projectApplication.setBuildOrgName(finalProject.getBuildOrgName()); |
|
|
|
projectApplication.setProjectVersion(finalProject.getVersion()); |
|
|
|
projectApplication.setProjectVersion(version); |
|
|
|
return projectApplication; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
projectApplicationService.saveOrUpdateBatch(applications); |
|
|
|