fix(测试跟踪): 删除测试用例时删除关联的评论

This commit is contained in:
shiziyuan9527 2020-09-22 15:32:04 +08:00
parent ed8a2f6d5f
commit c128021dc3
5 changed files with 22 additions and 12 deletions

View File

@ -46,4 +46,10 @@ public class TestCaseCommentService {
});
return testCaseComments;
}
public void deleteComment(String caseId) {
TestCaseCommentExample testCaseCommentExample = new TestCaseCommentExample();
testCaseCommentExample.createCriteria().andCaseIdEqualTo(caseId);
testCaseCommentMapper.deleteByExample(testCaseCommentExample);
}
}

View File

@ -77,6 +77,8 @@ public class TestCaseService {
TestCaseIssueService testCaseIssueService;
@Resource
TestCaseReviewTestCaseMapper testCaseReviewTestCaseMapper;
@Resource
TestCaseCommentService testCaseCommentService;
public void addTestCase(TestCaseWithBLOBs testCase) {
testCase.setName(testCase.getName());
@ -155,6 +157,7 @@ public class TestCaseService {
example.createCriteria().andCaseIdEqualTo(testCaseId);
testPlanTestCaseMapper.deleteByExample(example);
testCaseIssueService.delTestCaseIssues(testCaseId);
testCaseCommentService.deleteComment(testCaseId);
return testCaseMapper.deleteByPrimaryKey(testCaseId);
}

@ -1 +1 @@
Subproject commit d5b4969642fd8d10cc2f949d7377e0a0e5217a3a
Subproject commit 321c869938357e8c2253e5bd86c963828664ae23

View File

@ -5,7 +5,8 @@
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
:show-create="false" :tip="$t('commons.search_by_name_or_id')">
<template v-slot:title>
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh" :title="$t('test_track.review_view.all_review')"/>
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh"
:title="$t('test_track.review_view.all_review')"/>
</template>
<template v-slot:button>
<ms-table-button :is-tester-permission="true" icon="el-icon-video-play"
@ -37,7 +38,7 @@
type="selection"/>
<el-table-column width="40" :resizable="false" align="center">
<template v-slot:default="scope">
<!-- <show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectRows.size"/>-->
<!-- <show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectRows.size"/>-->
</template>
</el-table-column>
<el-table-column
@ -97,7 +98,7 @@
<el-table-column
prop="reviewerName"
:label="$t('test_track.review.review_creator')"
:label="$t('test_track.review.reviewer')"
show-overflow-tooltip
>
</el-table-column>
@ -428,14 +429,14 @@ export default {
<style scoped>
.search {
margin-left: 10px;
width: 240px;
}
.search {
margin-left: 10px;
width: 240px;
}
.test-case-status, .el-table {
cursor: pointer;
}
.test-case-status, .el-table {
cursor: pointer;
}
</style>

@ -1 +1 @@
Subproject commit 0a375848d034d20eaf05caf11769e1c75c39235c
Subproject commit f2d5a342c82e629f510550d5778d752bb73bf5e7