From e61c9eaa7b36f2cb29645d63c3de6204f0e84ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Fri, 11 Mar 2022 14:42:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8A=82=E7=82=B9=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E3=80=81=E6=A0=87=E7=AD=BE=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/xm/core/dao/XmGroupMapper.xml | 2 +- .../mapper/xm/core/dao/XmIterationMapper.xml | 20 +++++++++---------- .../mapper/xm/core/dao/XmProductMapper.xml | 4 ++-- .../core/dao/XmProductProjectLinkMapper.xml | 2 +- .../mapper/xm/core/dao/XmProjectMapper.xml | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmGroupMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmGroupMapper.xml index 6f5a3ab8..00f47340 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmGroupMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmGroupMapper.xml @@ -16,7 +16,7 @@ exists ( select 1 from xm_group_user gu where gu.group_id=res.id and gu.username like concat('%',#{groupUsernameKey},'%')) and (res.branch_id=#{branchId} or res.crow_branch_id=#{orCrowBranchId}) - and exists ( select 1 from xm_iteration_product_link ipl left join xm_product_project_link ppl on ipl.product_id=ppl.product_id and (ipl.product_id=res.product_id or ppl.project_id = res.project_id)) + and exists ( select 1 from xm_iteration_link ipl where (ipl.pro_id = res.product_id and ipl.ltype='1') or (ipl.pro_id=res.project_id and ipl.ltype='0')) delete from xm_group where project_id = #{projectId} diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml index dc5e0060..d2b497c5 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml @@ -31,15 +31,15 @@ - and exists ( select 1 from xm_iteration_product_link ipl - where ipl.iteration_id=res.id and ipl.product_id=#{productId} + and exists ( select 1 from xm_iteration_link ipl + where ipl.iteration_id=res.id and ipl.pro_id=#{productId} ) - and exists( select 1 from xm_iteration_product_link ipl inner join xm_product_project_link ppl - on ipl.product_id=ppl.product_id + and exists( select 1 from xm_iteration_link ipl inner join xm_product_project_link ppl + on ipl.pro_id=ppl.product_id where ppl.project_id=#{projectId} and ipl.iteration_id =res.id - and ipl.product_id=#{productId} + and ipl.pro_id=#{productId} ) @@ -77,15 +77,15 @@ - and exists ( select 1 from xm_iteration_product_link ipl - where ipl.iteration_id=res.id and ipl.product_id=#{productId} + and exists ( select 1 from xm_iteration_link ipl + where ipl.iteration_id=res.id and ipl.pro_id=#{productId} ) - and exists( select 1 from xm_iteration_product_link ipl inner join xm_product_project_link ppl - on ipl.product_id=ppl.product_id + and exists( select 1 from xm_iteration_link ipl inner join xm_product_project_link ppl + on ipl.pro_id=ppl.product_id where ppl.project_id=#{projectId} and ipl.iteration_id =res.id - and ipl.product_id=#{productId} + and ipl.pro_id=#{productId} ) diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml index 1c6ed147..a0df13dd 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml @@ -18,7 +18,7 @@ ) - and exists( select 1 from xm_iteration_product_link ppl + and exists( select 1 from xm_iteration_link ppl where ppl.iteration_id=#{iterationId} and ppl.product_id=res.id ) @@ -50,7 +50,7 @@ ) - and exists( select 1 from xm_iteration_product_link ipl where ipl.product_id =res.id and ipl.iteration_id=#{iterationId} ) + and exists( select 1 from xm_iteration_link ipl where ipl.pro_id =res.id and ipl.iteration_id=#{iterationId} ) and ( exists ( select 1 from xm_group_user gu inner join xm_task t on gu.project_id=t.project_id and t.product_id=res.id where gu.userid=#{compete} and t.product_id=res.id ) diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductProjectLinkMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductProjectLinkMapper.xml index d52cb64e..6fab5c7e 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductProjectLinkMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductProjectLinkMapper.xml @@ -8,7 +8,7 @@ diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml index 49d3ccf4..444a3dfa 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml @@ -55,8 +55,8 @@ ) - and exists( select 1 from xm_iteration_product_link ipl inner join xm_product_project_link ppl - on ipl.product_id=ppl.product_id + and exists( select 1 from xm_iteration_link ipl inner join xm_product_project_link ppl + on ipl.pro_id=ppl.product_id where ppl.project_id =res.id and ipl.iteration_id=#{iterationId} )