fix(用例管理): 修改批量关联需求不需要disable问题
This commit is contained in:
parent
bf74d8d882
commit
5843371237
|
@ -14,7 +14,6 @@ public class FunctionalThirdDemandPageRequest extends BasePageRequest {
|
|||
private String projectId;
|
||||
|
||||
@Schema(description = "当前选择的用例Id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{case_review.case_id.not_blank}")
|
||||
private String caseId;
|
||||
|
||||
}
|
||||
|
|
|
@ -350,7 +350,10 @@ public class FunctionalCaseDemandService {
|
|||
|
||||
public PluginPager<PlatformDemandDTO> pageDemand(FunctionalThirdDemandPageRequest request) {
|
||||
String platformId = projectApplicationService.getDemandPlatformId(request.getProjectId());
|
||||
List<String> demandIds = extFunctionalCaseDemandMapper.selectDemandIdsByCaseId(request.getCaseId(), platformId);
|
||||
List<String> demandIds = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(request.getCaseId())) {
|
||||
demandIds = extFunctionalCaseDemandMapper.selectDemandIdsByCaseId(request.getCaseId(), platformId);
|
||||
}
|
||||
DemandPageRequest demandPageRequest = new DemandPageRequest();
|
||||
demandPageRequest.setQuery(StringUtils.replace(request.getKeyword(), "\\", ""));
|
||||
demandPageRequest.setFilter(request.getFilter());
|
||||
|
@ -359,15 +362,17 @@ public class FunctionalCaseDemandService {
|
|||
demandPageRequest.setProjectConfig(projectApplicationService.getProjectDemandThirdPartConfig(request.getProjectId()));
|
||||
Platform platform = projectApplicationService.getPlatform(request.getProjectId(), false);
|
||||
PluginPager<PlatformDemandDTO> platformDemandDTOPluginPager = platform.pageDemand(demandPageRequest);
|
||||
PlatformDemandDTO data = platformDemandDTOPluginPager.getData();
|
||||
List<PlatformDemandDTO.Demand> list = data.getList();
|
||||
for (PlatformDemandDTO.Demand demand : list) {
|
||||
if (demandIds.contains(demand.getDemandId())) {
|
||||
demand.setDisabled(true);
|
||||
if (CollectionUtils.isNotEmpty(demandIds)) {
|
||||
PlatformDemandDTO data = platformDemandDTOPluginPager.getData();
|
||||
List<PlatformDemandDTO.Demand> list = data.getList();
|
||||
for (PlatformDemandDTO.Demand demand : list) {
|
||||
if (demandIds.contains(demand.getDemandId())) {
|
||||
demand.setDisabled(true);
|
||||
}
|
||||
}
|
||||
data.setList(list);
|
||||
platformDemandDTOPluginPager.setData(data);
|
||||
}
|
||||
data.setList(list);
|
||||
platformDemandDTOPluginPager.setData(data);
|
||||
return platformDemandDTOPluginPager;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue