fix(测试计划): 报告批量删除问题

--bug=1009499 --user=lyh
【github#9167】测试计划报告批量删除功能bug
https://www.tapd.cn/55049933/s/1090099

Closes #9167
This commit is contained in:
shiziyuan9527 2022-01-10 18:07:19 +08:00 committed by 刘瑞斌
parent 1ac04e3f3b
commit cf92062657
1 changed files with 5 additions and 2 deletions

View File

@ -980,7 +980,7 @@ public class TestPlanReportService {
public void delete(QueryTestPlanReportRequest request) {
List<String> deleteReportIds = request.getDataIds();
if (request.isSelectAllDate()) {
deleteReportIds = this.getAllApiIdsByFontedSelect(request.getFilters(), request.getName(), request.getProjectId(), request.getUnSelectIds());
deleteReportIds = this.getAllApiIdsByFontedSelect(request.getFilters(), request.getName(), request.getProjectId(), request.getUnSelectIds(), request.getCombine());
}
if (CollectionUtils.isNotEmpty(deleteReportIds)) {
TestPlanReportExample deleteReportExample = new TestPlanReportExample();
@ -998,12 +998,15 @@ public class TestPlanReportService {
}
}
private List<String> getAllApiIdsByFontedSelect(Map<String, List<String>> filters, String name, String projectId, List<String> unSelectIds) {
private List<String> getAllApiIdsByFontedSelect(Map<String, List<String>> filters, String name, String projectId, List<String> unSelectIds, Map<String, Object> combine) {
QueryTestPlanReportRequest request = new QueryTestPlanReportRequest();
request.setFilters(filters);
request.setName(name);
request.setProjectId(projectId);
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
if (combine != null) {
request.setCombine(combine);
}
List<TestPlanReportDTO> resList = extTestPlanReportMapper.list(request);
List<String> ids = new ArrayList<>(0);
if (!resList.isEmpty()) {