<iftest=" onlineTimeEnd !=null "> and res.online_time < #{onlineTimeEnd} </if>
<includerefid="where"/>
<iftest=" ( menuId != null and menuId !='')">
and exists ( select 1 from xm_iteration_menu im where im.iteration_id=res.id and im.menu_id=#{menuId}
and exists ( select 1 from xm_menu im where im.iteration_id=res.id and im.menu_id=#{menuId}
<iftest="productId != null and productId !='' "> and im.product_id=#{productId} </if>
)
</if>
@ -44,7 +44,7 @@
</if>
<iftest="compete !=null and compete!=''">
and ( res.admin_userid=#{compete}
or exists (select 1 from xm_iteration_menu im left join xm_menu m on im.product_id=m.product_id where m.mm_userid=#{compete} and im.iteration_id=res.id)
or exists (select 1 from xm_menu m where m.mm_userid=#{compete} and m.iteration_id=res.id)
)
</if>
@ -71,7 +71,7 @@
<iftest=" onlineTimeEnd !=null "> and res.online_time < #{onlineTimeEnd} </if>
<includerefid="where"/>
<iftest=" ( menuId != null and menuId !='')">
and exists ( select 1 from xm_iteration_menu im where im.iteration_id=res.id and im.menu_id=#{menuId}
and exists ( select 1 from xm_menu im where im.iteration_id=res.id and im.menu_id=#{menuId}
<iftest="productId != null and productId !='' "> and im.product_id=#{productId} </if>
)
</if>
@ -90,7 +90,7 @@
</if>
<iftest="compete !=null and compete!=''">
and ( res.admin_userid=#{compete}
or exists (select 1 from xm_iteration_menu im left join xm_menu m on im.product_id=m.product_id where m.mm_userid=#{compete} and im.iteration_id=res.id)
or exists (select 1 from xm_menu m where m.mm_userid=#{compete} and m.iteration_id=res.id)
)
</if>
<iftest="key != null and key !='' "> and res.iteration_name like #{key} </if>
and exists( select 1 from xm_task t inner join xm_iteration_menu im on t.menu_id=im.menu_id where t.project_phase_id=res.id and im.iteration_id=#{iterationId})
and exists( select 1 from xm_task t inner join xm_menu im on t.menu_id=im.menu_id where t.project_phase_id=res.id and im.iteration_id=#{iterationId})
</if>
<iftest='productId!=null and productId!="" '>
and exists( select 1 from xm_task t where t.product_id=#{productId})