<iftest="hisHandlerUserid !=null "> and exists (select 1 from xm_question_handle h where h.question_id = res.id and h.handler_userid=#{hisHandlerUserid} and handle_status=#{hisHandleStatus})</if>
<iftest=" createTimeStart !=null "> and res.create_time between #{createTimeStart} and #{createTimeEnd} </if>
<iftest=" ltimeStart !=null "> and res.ltime between #{ltimeStart} and #{ltimeEnd} </if>
<includerefid="where"/>
<iftest=" productId !=null and productId!='' "> and exists( select 1 from xm_menu m where m.menu_id=res.menu_id and m.product_id=#{productId}) </if>
<iftest="myUserid != null and myUserid != ''"> and ( res.create_userid=#{myUserid} or res.handler_userid=#{myUserid}) </if>
<iftest="menuIds != null"> and
res.menu_id in
@ -29,7 +27,7 @@
</foreach>
</if>
<iftest="compete !=null and compete!=''">
and exists ( select 1 from xm_project_group_user gu where gu.userid=#{compete} and gu.project_id=res.project_id )
and exists ( select 1 from xm_project_group_user gu where gu.userid=#{compete} and (gu.project_id=res.project_id or gu.product_id=res.product_id))
</if>
<iftest="key != null and key !='' "> and res.name like #{key} </if>
<iftest="work != null and work != ''"> and res.status != 'resolved' </if>