[框架][MyBatis]MyBatis集锦

1.判断数组是否为空

<if test="null != queryTradeType and queryTradeType.size > 0">
            and B_TRADE_IB.TRADE_TYPE in
    <foreach collection="queryTradeType" item="item" index="index" open="(" separator="," close=")">
                #{item,jdbcType=VARCHAR}
    </foreach>
</if>
原文地址:https://www.cnblogs.com/wendelhuang/p/6760823.html