fix(测试跟踪): 功能用例批量删除的问题
--bug=1015479 --user=宋昌昌 【测试跟踪】功能用例-批量选择用例-选择所有数据(24条)-批量删除只删除当前页10条用例 https://www.tapd.cn/55049933/s/1215152
This commit is contained in:
parent
e4fd5f1900
commit
6a733aca3f
|
@ -343,7 +343,7 @@ public class TestCaseController {
|
|||
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, target = "#targetClass.findByBatchRequest(#request)", targetClass = TestCaseService.class,
|
||||
event = NoticeConstants.Event.DELETE, subject = "测试用例通知")
|
||||
public void deleteToGcBatch(@RequestBody TestCaseBatchRequest request) {
|
||||
testCaseService.deleteToGcBatch(request.getIds());
|
||||
testCaseService.deleteToGcBatch(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/movePublic/deleteToGc")
|
||||
|
|
|
@ -204,7 +204,7 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
|
|||
List<String> testCaseIdList = this.selectCaseIdByNodeIds(nodeIds);
|
||||
TestCaseBatchRequest request = new TestCaseBatchRequest();
|
||||
request.setIds(testCaseIdList);
|
||||
testCaseService.deleteToGcBatch(request.getIds());
|
||||
testCaseService.deleteToGcBatch(request);
|
||||
|
||||
TestCaseNodeExample testCaseNodeExample = new TestCaseNodeExample();
|
||||
testCaseNodeExample.createCriteria().andIdIn(nodeIds);
|
||||
|
|
|
@ -682,7 +682,14 @@ public class TestCaseService {
|
|||
return extTestCaseMapper.deleteToGc(request);
|
||||
}
|
||||
|
||||
public int deleteToGcBatch(List<String> ids) {
|
||||
public int deleteToGcBatch(TestCaseBatchRequest request) {
|
||||
List<String> ids = new ArrayList<String>();
|
||||
if (request.getCondition() != null && request.getCondition().isSelectAll()) {
|
||||
List<TestCaseDTO> testCaseDTOS = listTestCase(request.getCondition());
|
||||
ids = testCaseDTOS.stream().map(TestCaseDTO::getId).collect(Collectors.toList());
|
||||
} else {
|
||||
ids = request.getIds();
|
||||
}
|
||||
return deleteToGcBatch(ids, null);
|
||||
}
|
||||
|
||||
|
@ -2273,7 +2280,7 @@ public class TestCaseService {
|
|||
|
||||
public void reduction(TestCaseBatchRequest request) {
|
||||
List<String> ids = new ArrayList<>();
|
||||
if (request.getCondition().isSelectAll()) {
|
||||
if (request.getCondition() != null && request.getCondition().isSelectAll()) {
|
||||
List<TestCaseDTO> allReductionTestCases = listTestCase(request.getCondition());
|
||||
ids = allReductionTestCases.stream().map(TestCaseDTO::getId).collect(Collectors.toList());
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue