Selaa lähdekoodia

退回和应用匹配版本号

tags/24080901
PoffyZhang 1 vuosi sitten
vanhempi
commit
636063b593
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java

+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Näytä tiedosto

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


Loading…
Peruuta
Tallenna