|
|
|
@ -22,22 +22,33 @@ |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test=' iterationFilterType!=null and iterationFilterType!=""'> |
|
|
|
<if test='iterationFilterType=="not-join"'> and (res.iteration_id is null or res.iteration_id ='') </if> |
|
|
|
<if test='iterationFilterType=="join"'> and res.iteration_id is not null and res.iteration_id !='' </if> |
|
|
|
<if test='iterationFilterType=="not-join-any-iteration"'> and (res.iteration_id is null or res.iteration_id ='') </if> |
|
|
|
<if test='iterationFilterType=="join-any-iteration"'> and ( res.iteration_id is not null and res.iteration_id !='' ) </if> |
|
|
|
<if test='iterationFilterType=="join-curr-iteration"'> and res.iteration_id=#{filterIterationId} </if> |
|
|
|
<if test='iterationFilterType=="not-join-curr-iteration"'> and res.iteration_id!=#{filterIterationId} </if> |
|
|
|
</if> |
|
|
|
<if test=' taskFilterType!=null and taskFilterType!="" '> |
|
|
|
and <if test='taskFilterType=="not-join"'> not </if> |
|
|
|
exists ( select 1 from xm_task t where t.menu_id=res.menu_id) |
|
|
|
<if test='taskFilterType=="not-join-curr-project"'> |
|
|
|
and not exists(select 1 from xm_task t where t.menu_id=res.menu_id and t.project_id=#{projectId}) |
|
|
|
</if> |
|
|
|
<if test='taskFilterType=="not-join-any-project"'> |
|
|
|
and not exists(select 1 from xm_task t where t.menu_id=res.menu_id) |
|
|
|
</if> |
|
|
|
<if test='taskFilterType=="join-any-project"'> |
|
|
|
and exists(select 1 from xm_task t where t.menu_id=res.menu_id) |
|
|
|
</if> |
|
|
|
<if test='taskFilterType=="join-curr-project"'> |
|
|
|
and exists(select 1 from xm_task t where t.menu_id=res.menu_id and t.project_id=#{projectId}) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="key != null and key !='' "> and res.menu_name like #{key} </if> |
|
|
|
<if test="isTop!=null and isTop!=''"> and (res.pmenu_id is null or res.pmenu_id = '')</if> |
|
|
|
|
|
|
|
<if test=" projectId!=null and projectId!=''"> and |
|
|
|
exists (select 1 from xm_task t where t.project_id=#{projectId} and res.menu_id=t.menu_id and t.ntype='0') |
|
|
|
</if> |
|
|
|
<if test=" linkProjectId!=null and linkProjectId!=''"> and |
|
|
|
exists (select 1 from xm_product_project_link link where link.product_id=res.product_id and link.project_id=#{linkProjectId}) |
|
|
|
</if> |
|
|
|
<if test=" linkIterationId!=null and linkIterationId!=''"> and |
|
|
|
exists (select 1 from xm_iteration_link link where link.pro_id=res.product_id and link.iteration_id=#{linkIterationId}) |
|
|
|
</if> |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectExistIterationMenus" parameterType="HashMap" resultType="com.xm.core.entity.XmMenu"> |
|
|
|
|