mybatis中判断集合的size

1
2
3
4
5
6
<if test="null != staffCodeList and staffCodeList.size > 0">
and user_code in
<foreach item='item' index='index' collection="staffCodeList" open="(" separator="," close=")">
#{item.code}
</foreach>
</if>