mybatis判断集合为空或者元素个数为零

mybatis判断集合为空或者元素个数为零:

        <if test="mlhs != null and mlhs.size() != 0">
            and t.mlh_name not in  
            <foreach collection="mlhs" item="item1" open="(" close=")" index="i" separator=","> #{item1,jdbcType=VARCHAR}
            </foreach>
        </if>
原文地址:https://www.cnblogs.com/stono/p/4941585.html