fix(测试跟踪): 功能用例回收站删除数据bug修复

This commit is contained in:
zhangdahai112 2022-01-25 18:44:24 +08:00 committed by 刘瑞斌
parent b6204a2569
commit cb7c500caf
3 changed files with 9 additions and 0 deletions

View File

@ -1595,6 +1595,13 @@ public class TestCaseService {
public void deleteTestCaseBath(TestCaseBatchRequest request) {
TestCaseExample example = this.getBatchExample(request);
//删除全部版本的数据根据 RefId
List<String> refIds = testCaseMapper.selectByExample(example).stream().map(TestCase::getRefId).collect(Collectors.toList());
example.clear();
example.createCriteria().andRefIdIn(refIds);
List<String> allVersionDataIds = testCaseMapper.selectByExample(example).stream().map(TestCase::getId).collect(Collectors.toList());
request.setIds(allVersionDataIds);
deleteTestPlanTestCaseBath(request.getIds());
relationshipEdgeService.delete(request.getIds()); // 删除关系图

View File

@ -23,6 +23,7 @@
ref="versionHistory"
:version-data="versionData"
:current-id="currentTestCaseInfo.id"
:is-read="currentTestCaseInfo.trashEnable"
@confirmOtherInfo="confirmOtherInfo"
:current-project-id="currentProjectId"
@compare="compare" @checkout="checkout" @create="create" @del="del"/>

View File

@ -804,6 +804,7 @@ export default {
} else {
this.$get('test/case/get/' + testCase.id, response => {
let testCase = response.data;
testCase.trashEnable = this.trashEnable;
this.$emit('testCaseEdit', testCase);
});
}