From 529a9a732d46350e981d4e17cc75f06886ef709d Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 20 Jun 2023 14:27:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=A2=AB=E7=A7=BB=E9=99=A4=E9=A1=B9=E7=9B=AE=E7=BB=84?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E5=B7=A5=E4=BD=9C=E5=8F=B0=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E7=BB=9F=E8=AE=A1=E5=85=B6=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027173 --user=宋天阳 【我的工作台】我的仪表盘首页 -我创建的用例-功能用例数量无统计数据 https://www.tapd.cn/55049933/s/1383870;--bug=1027174 --user=宋天阳 【我的工作台】我的关注 tab 页面没有任何统计数据 https://www.tapd.cn/55049933/s/1383869 --- .../base/mapper/ext/ExtIssuesMapper.xml | 5 ++- .../base/mapper/ext/ExtApiScenarioMapper.xml | 6 +++ .../base/mapper/ext/ExtApiTestCaseMapper.xml | 7 ++- .../base/mapper/ext/ExtLoadTestMapper.xml | 6 +++ .../base/mapper/ext/ExtTestCaseMapper.xml | 6 +++ .../request/api/ApiScenarioRequest.java | 4 ++ .../request/api/ApiTestCaseRequest.java | 3 ++ .../request/track/QueryTestCaseRequest.java | 3 ++ .../request/track/QueryTestPlanRequest.java | 2 + .../service/WorkstationService.java | 44 +++++++++++++------ 10 files changed, 71 insertions(+), 15 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml index a1e637fa69..2458b79a45 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml @@ -88,7 +88,10 @@ select count(1) as `count`, if(i.platform = 'Local', cfi.value, i.platform_status) as statusValue, i.platform from issues i inner join project p - on i.project_id = p.id and p.workspace_id = #{request.workspaceId} + on i.project_id = p.id and p.workspace_id = #{request.workspaceId} and + p.id IN (SELECT source_id + FROM user_group + WHERE user_id = #{request.creator}) left join custom_field_issues cfi on i.id = cfi.resource_id and field_id in (select cf.id from custom_field cf diff --git a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml index 8b0c96f230..bc565f8bb2 100644 --- a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml +++ b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml @@ -243,6 +243,12 @@ AND create_time >= #{request.scheduleCreateTime} ) + + AND project.id in + + #{itemId} + + AND api_scenario.id in diff --git a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index a4c8e7ef56..88860a117d 100644 --- a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -277,7 +277,6 @@ inner join project on api_test_case.project_id = project.id inner JOIN api_definition a ON api_test_case.api_definition_id = a.id - and a.latest = 1