Browse Source

添加节点类型、标签等

master
陈裕财 4 years ago
parent
commit
e61c9eaa7b
  1. 2
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmGroupMapper.xml
  2. 20
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml
  3. 4
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml
  4. 2
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductProjectLinkMapper.xml
  5. 4
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

2
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},'%')) exists ( select 1 from xm_group_user gu where gu.group_id=res.id and gu.username like concat('%',#{groupUsernameKey},'%'))
</if> </if>
<if test="orCrowBranchId!=null and orCrowBranchId!=''"> and (res.branch_id=#{branchId} or res.crow_branch_id=#{orCrowBranchId})</if> <if test="orCrowBranchId!=null and orCrowBranchId!=''"> and (res.branch_id=#{branchId} or res.crow_branch_id=#{orCrowBranchId})</if>
<if test="iterationId!=null and iterationId!=''"> 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))</if>
<if test="iterationId!=null and iterationId!=''"> 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'))</if>
</sql> </sql>
<delete id="deleteByProjectId" parameterType="com.xm.core.entity.XmGroup"> <delete id="deleteByProjectId" parameterType="com.xm.core.entity.XmGroup">
delete from xm_group where project_id = #{projectId} delete from xm_group where project_id = #{projectId}

20
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml

@ -31,15 +31,15 @@
</if> </if>
<if test="( productId != null and productId !='') and ( menuId == null or menuId =='') and ( projectId ==null or projectId=='' ) "> <if test="( productId != null and productId !='') and ( menuId == null or menuId =='') and ( projectId ==null or projectId=='' ) ">
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}
) )
</if> </if>
<if test=" projectId !=null and projectId!=''"> <if test=" projectId !=null and projectId!=''">
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 where ppl.project_id=#{projectId} and ipl.iteration_id =res.id
<if test=" productId != null and productId !='' "> and ipl.product_id=#{productId}</if>
<if test=" productId != null and productId !='' "> and ipl.pro_id=#{productId}</if>
) )
</if> </if>
<if test="compete !=null and compete!=''"> <if test="compete !=null and compete!=''">
@ -77,15 +77,15 @@
</if> </if>
<if test="( productId != null and productId !='') and ( menuId == null or menuId =='') and ( projectId ==null or projectId=='' ) "> <if test="( productId != null and productId !='') and ( menuId == null or menuId =='') and ( projectId ==null or projectId=='' ) ">
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}
) )
</if> </if>
<if test=" projectId !=null and projectId!=''"> <if test=" projectId !=null and projectId!=''">
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 where ppl.project_id=#{projectId} and ipl.iteration_id =res.id
<if test=" productId != null and productId !='' "> and ipl.product_id=#{productId}</if>
<if test=" productId != null and productId !='' "> and ipl.pro_id=#{productId}</if>
) )
</if> </if>
<if test="compete !=null and compete!=''"> <if test="compete !=null and compete!=''">

4
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductMapper.xml

@ -18,7 +18,7 @@
) )
</if> </if>
<if test=" iterationId !=null and iterationId!=''"> <if test=" iterationId !=null and iterationId!=''">
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 where ppl.iteration_id=#{iterationId} and ppl.product_id=res.id
) )
</if> </if>
@ -50,7 +50,7 @@
) )
</if> </if>
<if test="iterationId!=null and iterationId!=''"> <if test="iterationId!=null and iterationId!=''">
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} )
</if> </if>
<if test="compete !=null and compete!=''"> <if test="compete !=null and compete!=''">
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 ) 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 )

2
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProductProjectLinkMapper.xml

@ -8,7 +8,7 @@
<select id="selectListByIterationId" parameterType="String" resultType="com.xm.core.entity.XmProductProjectLink"> <select id="selectListByIterationId" parameterType="String" resultType="com.xm.core.entity.XmProductProjectLink">
select * from xm_product_project_link res select * from xm_product_project_link res
where exists (select 1 from xm_iteration_product_link ipl where ipl.iteration_id=#{iterationId} and ipl.product_id=res.product_id)
where exists (select 1 from xm_iteration_link ipl where ipl.iteration_id=#{iterationId} and ipl.pro_id=res.product_id)
</select> </select>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->

4
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

@ -55,8 +55,8 @@
) )
</if> </if>
<if test="iterationId!=null and iterationId!=''"> <if test="iterationId!=null and iterationId!=''">
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} where ppl.project_id =res.id and ipl.iteration_id=#{iterationId}
) )
</if> </if>

Loading…
Cancel
Save