<iftest="groupNameKey != null and groupNameKey !='' "> and res.group_name like concat('%',#{groupNameKey},'%') </if>
<iftest="groupNameKey != null and groupNameKey !='' "> and res.group_name like concat('%',#{groupNameKey},'%') </if>
<iftest="mngUsernamekey != null and mngUsernamekey !='' "> and (res.leader_username like concat('%',#{mngUsernamekey},'%') or res.ass_username like like concat('%',#{mngUsernamekey},'%')) </if>
<iftest="mngUsernamekey != null and mngUsernamekey !='' "> and (res.leader_username like concat('%',#{mngUsernamekey},'%') or res.ass_username like concat('%',#{mngUsernamekey},'%')) </if>
<iftest="groupUsernamekey != null and groupUsernamekey !='' "> and
<iftest="groupUsernamekey != null and groupUsernamekey !='' "> and
exists ( select 1 from xm_project_group_user gu where gu.group_id=res.id and gu.username like concat('%',#{groupUsernamekey},'%'))
exists ( select 1 from xm_project_group_user gu where gu.group_id=res.id and gu.username like concat('%',#{groupUsernamekey},'%'))
<iftest="groupNameKey != null and groupNameKey !='' "> and g.group_name like concat('%',#{groupNameKey},'%') </if>
<iftest="groupNameKey != null and groupNameKey !='' "> and g.group_name like concat('%',#{groupNameKey},'%') </if>
<iftest="mngUsernamekey != null and mngUsernamekey !='' "> and (g.leader_username like concat('%',#{mngUsernamekey},'%') or g.ass_username like like concat('%',#{mngUsernamekey},'%')) </if>
<iftest="mngUsernamekey != null and mngUsernamekey !='' "> and (g.leader_username like concat('%',#{mngUsernamekey},'%') or g.ass_username like concat('%',#{mngUsernamekey},'%')) </if>
<iftest="groupUsernamekey != null and groupUsernamekey !='' "> and res.username like concat('%',#{groupUsernamekey},'%') </if>
<iftest="groupUsernamekey != null and groupUsernamekey !='' "> and res.username like concat('%',#{groupUsernamekey},'%') </if>