<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> 亲测可用