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>

 

文章来自:http://www.cnblogs.com/stono/p/4941585.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3