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(),
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")

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);
// 查询中不需要项目ID参数
String projectId = request.getProjectId();
request.setProjectId(null);
List<TestPlanCasePageResponse> functionalCaseLists = extTestPlanFunctionalCaseMapper.getCasePage(request, deleted, request.getSortString());
if (CollectionUtils.isEmpty(functionalCaseLists)) {
return new ArrayList<>();

View File

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