转载于:https://blog.csdn.net/dongyanfa/article/details/80009409

<if test="null != staffCodeList and staffCodeList.size > 0">
and gui.USER_CODE not in
<foreach collection="staffCodeList" item="staffCode" open="(" separator=","  close=")">
#{staffCode}
</foreach>
</if>