fix(测试跟踪): 修复部分测试计划点开后,页面出现无响应的缺陷

--bug=1010955 --user=王孝刚 【测试跟踪】-部分测试计划点开后,页面出现无响应
https://www.tapd.cn/55049933/s/1115655
This commit is contained in:
wxg0103 2022-03-09 15:35:34 +08:00 committed by jianxing
parent dc33c117b0
commit a1f3cc8701
2 changed files with 9 additions and 5 deletions

View File

@ -77,6 +77,8 @@ public class IssuesService {
private TestPlanTestCaseService testPlanTestCaseService;
@Resource
private IssueFollowMapper issueFollowMapper;
@Resource
private TestPlanTestCaseMapper testPlanTestCaseMapper;
public void testAuth(String workspaceId, String platform) {
IssuesRequest issuesRequest = new IssuesRequest();
@ -284,10 +286,16 @@ public class IssuesService {
if (request.getIsPlanEdit() == true) {
example.createCriteria().andResourceIdEqualTo(caseResourceId).andIssuesIdEqualTo(id);
testCaseIssuesMapper.deleteByExample(example);
testCaseIssueService.updateIssuesCount(caseResourceId);
} else {
extIssuesMapper.deleteIssues(id, caseResourceId);
TestPlanTestCaseExample testPlanTestCaseExample = new TestPlanTestCaseExample();
testPlanTestCaseExample.createCriteria().andCaseIdEqualTo(caseResourceId);
List<TestPlanTestCase> list = testPlanTestCaseMapper.selectByExample(testPlanTestCaseExample);
list.forEach(item -> {
testCaseIssueService.updateIssuesCount(item.getId());
});
}
testCaseIssueService.updateIssuesCount(caseResourceId);
}
public void delete(String id) {

View File

@ -86,10 +86,6 @@ public class TestPlanTestCaseService {
public List<TestPlanCaseDTO> list(QueryTestPlanCaseRequest request) {
request.setOrders(ServiceUtils.getDefaultSortOrder(request.getOrders()));
List<TestPlanCaseDTO> testPlanCaseDTOList = extTestPlanTestCaseMapper.list(request);
testPlanCaseDTOList.forEach(item -> {
testCaseIssueService.updateIssuesCount(item.getId());
});
List<TestPlanCaseDTO> list = extTestPlanTestCaseMapper.list(request);
QueryMemberRequest queryMemberRequest = new QueryMemberRequest();
queryMemberRequest.setProjectId(request.getProjectId());