Loading

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>

 

posted @ 2015-11-06 09:05  stono  阅读(5394)  评论(0编辑  收藏  举报