From b10c5916ae4eb2ae5478cf087d27ee641a0b78ae Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 14 Jul 2023 10:19:45 +0800 Subject: [PATCH] =?UTF-8?q?debug=20=E7=8A=B6=E6=80=81=20=E8=B0=93=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java | 12 ++++++------ .../main/java/com/ningdatech/pmapi/irs/model/dto/ApiDTO.java | 3 +-- .../ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 3 +++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java index cc79497..43b37be 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java @@ -165,9 +165,9 @@ public class AppIrsManage { log.info("查询应用目录 : {}",JSON.toJSONString(forEntity)); - if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getDatas()) - && CollUtil.isNotEmpty(forEntity.getBody().getDatas().getApiApplySearchResult())){ - return forEntity.getBody().getDatas().getApiApplySearchResult().get(0); + if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getData()) + && CollUtil.isNotEmpty(forEntity.getBody().getData().getApiApplySearchResult())){ + return forEntity.getBody().getData().getApiApplySearchResult().get(0); } return null; } @@ -186,9 +186,9 @@ public class AppIrsManage { log.info("查询应用目录 : {}",JSON.toJSONString(forEntity)); - if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getDatas()) - && CollUtil.isNotEmpty(forEntity.getBody().getDatas().getApiApplySearchResult())){ - return forEntity.getBody().getDatas().getApiApplySearchResult(); + if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getData()) + && CollUtil.isNotEmpty(forEntity.getBody().getData().getApiApplySearchResult())){ + return forEntity.getBody().getData().getApiApplySearchResult(); } return Collections.emptyList(); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiDTO.java index b09265e..89bf41d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiDTO.java @@ -15,6 +15,5 @@ import java.util.List; public class ApiDTO { private String code; private String msg; - private String data; - private ApiSearchResult datas; + private ApiSearchResult data; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 4a22769..07f58bb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -1031,12 +1031,15 @@ public class TodoCenterManage { //批量删除 projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) .eq(ProjectApplication::getProjectId,project.getId())); + projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) + .eq(ProjectApplication::getProjectCode,project.getProjectCode())); if(isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())){ //批量添加 List applications = projectDto.getApplicationList().stream().map(application -> { ProjectApplication projectApplication = new ProjectApplication(); BeanUtils.copyProperties(application, projectApplication); projectApplication.setProjectId(project.getId()); + projectApplication.setProjectCode(project.getProjectCode()); return projectApplication; }).collect(Collectors.toList()); projectApplicationService.saveBatch(applications);