fix(测试计划): 计划详情功能用例列表查询问题

This commit is contained in:
WangXu10 2024-09-04 16:45:26 +08:00 committed by 刘瑞斌
parent d676e5d3eb
commit 8c9f79f14a
3 changed files with 3 additions and 7 deletions

View File

@ -72,7 +72,7 @@ public class TestPlanFunctionalCaseController {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
StringUtils.isNotBlank(request.getSortString("id", "functional_case")) ? request.getSortString("id", "functional_case") : "test_plan_functional_case.pos desc"); StringUtils.isNotBlank(request.getSortString("id", "functional_case")) ? request.getSortString("id", "functional_case") : "test_plan_functional_case.pos desc");
return PageUtils.setPageInfo(page, testPlanFunctionalCaseService.getFunctionalCasePage(request, false)); return PageUtils.setPageInfo(page, testPlanFunctionalCaseService.getFunctionalCasePage(request, false, SessionUtils.getCurrentProjectId()));
} }
@PostMapping("/tree") @PostMapping("/tree")

View File

@ -242,11 +242,8 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
} }
public List<TestPlanCasePageResponse> getFunctionalCasePage(TestPlanCaseRequest request, boolean deleted) { public List<TestPlanCasePageResponse> getFunctionalCasePage(TestPlanCaseRequest request, boolean deleted, String projectId) {
filterCaseRequest(request); filterCaseRequest(request);
// 查询中不需要项目ID参数
String projectId = request.getProjectId();
request.setProjectId(null);
List<TestPlanCasePageResponse> functionalCaseLists = extTestPlanFunctionalCaseMapper.getCasePage(request, deleted, request.getSortString()); List<TestPlanCasePageResponse> functionalCaseLists = extTestPlanFunctionalCaseMapper.getCasePage(request, deleted, request.getSortString());
if (CollectionUtils.isEmpty(functionalCaseLists)) { if (CollectionUtils.isEmpty(functionalCaseLists)) {
return new ArrayList<>(); return new ArrayList<>();

View File

@ -575,8 +575,7 @@
const tableParams = await getTableParams(false); const tableParams = await getTableParams(false);
setLoadListParams({ setLoadListParams({
...tableParams, ...tableParams,
projectId: projectId: props.activeModule !== 'all' && props.treeType === 'MODULE' ? props.moduleParentId : '',
props.activeModule !== 'all' && props.treeType === 'MODULE' ? props.moduleParentId : appStore.currentProjectId,
}); });
resetSelector(); resetSelector();
loadList(); loadList();