<iftest="branchName != null and branchName != ''">
and branchName like CONCAT('%',#{branchName},'%')
</if>
<iftest="areaName != null and areaName != ''">
and account in (select account from sys_user_area_relation where areaname = #{areaName})
</if>
<iftest="channel != null and channel != ''">
and account in (select account from sys_user_channel_relation where (channelnbr like CONCAT('%',#{channel},'%') or channelname like CONCAT('%',#{channel},'%')))
</if>
<iftest="bevyCust != null and bevyCust != ''">
and account in (select account from sys_user_bevy_cust_relation where (bevy_cust_code like CONCAT('%',#{bevyCust},'%') or bevy_cust_name like CONCAT('%',#{bevyCust},'%')))
</if>
<iftest="salestaffId != null and salestaffId != ''">