fix(项目设置): 修复同步需求部分需求未删除问题

--bug=1046816 --user郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001046816
This commit is contained in:
guoyuqi 2024-09-20 13:12:08 +08:00 committed by Craftsman
parent 5887856daa
commit 795c128136
1 changed files with 2 additions and 0 deletions

View File

@ -97,10 +97,12 @@ public class DemandSyncService {
demandRelateQueryRequest.setRelateDemandIds(new ArrayList<>(demandIds)); demandRelateQueryRequest.setRelateDemandIds(new ArrayList<>(demandIds));
PlatformDemandDTO demands = platform.getDemands(demandRelateQueryRequest); PlatformDemandDTO demands = platform.getDemands(demandRelateQueryRequest);
if (demands == null) { if (demands == null) {
deleteIds.addAll(demandIds);
return; return;
} }
List<PlatformDemandDTO.Demand> demandList = demands.getList(); List<PlatformDemandDTO.Demand> demandList = demands.getList();
if (CollectionUtils.isEmpty(demandList)) { if (CollectionUtils.isEmpty(demandList)) {
deleteIds.addAll(demandIds);
return; return;
} }
List<String> platformIds = demandList.stream().map(PlatformDemandDTO.Demand::getDemandId).toList(); List<String> platformIds = demandList.stream().map(PlatformDemandDTO.Demand::getDemandId).toList();