[框架][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>

 

posted @ 2017-04-25 10:46  weiwei5987  阅读(105)  评论(0编辑  收藏  举报