From 5a1c6504eca1dedd2cd65ca827c778fa7f75d1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 28 Jan 2023 12:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8F=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xm/core/dao/XmTestPlanCaseMapper.xml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml index f812a590..307b4ea8 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml @@ -28,6 +28,14 @@ and c.pbranch_id=#{pbranchId} + + and exists ( select 1 from xm_menu m + where m.iteration_id=#{linkIterationId} and c.menu_id=m.menu_id + + and m.product_id=#{productId} + + ) + @@ -103,9 +111,31 @@ ( SELECT sum(if(res.case_id is null ,0,1)) as use_times,c.id FROM xm_test_case c left join xm_test_plan_case res on c.id=res.case_id + + and res.project_id=#{projectId} + + + and res.exec_date between #{startExecDate} and #{endExecDate} + - - + + and c.casedb_id=#{casedbId} + + + + and c.product_id=#{productId} + + + and c.pbranch_id=#{pbranchId} + + + and exists ( select 1 from xm_menu m + where m.iteration_id=#{linkIterationId} and c.menu_id=m.menu_id + + and m.product_id=#{productId} + + ) + group by c.id ) as ret group by ret.use_times