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