ibatis 参数类型为map,map里面有list

    <select id="getChannelLayerList" parameterClass="java.util.HashMap"
        resultMap="ChannelLayerMap">
        SELECT * FROM
        <dynamic>
            <isEqual property="dataSource" compareValue="1">
                channellayer
            </isEqual>

            <isEqual property="dataSource" compareValue="0">
                channellayer_temp
            </isEqual>
        </dynamic>
        <dynamic prepend="WHERE">
            1=1
            <isNotNull property="platForm">
                and
                platForm=#platForm#
            </isNotNull>
            <isNotNull property="provinceId">
                and
                provinceId=#provinceId#
            </isNotNull>
            <isNotNull property="cityId">
                and
                cityId=#cityId#
            </isNotNull>
            <isNotNull property="channelId">
                and
                channelId=#channelId#
            </isNotNull>
            <isNotNull property="typeId">
                and
                typeId=#typeId#
            </isNotNull>
            <isNotNull property="beginTime">
                  <![CDATA[  and beginTime >= #beginTime# ]]>
            </isNotNull>
            <isNotNull property="endTime">
                <![CDATA[    and endTime<=#endTime# ]]>
            </isNotNull>
            <isNotNull property="batchIds">
                and batchId in
                <iterate property="batchIds" conjunction="," open="(" close=")">
                    #batchIds[]#
                </iterate>
            </isNotNull>
        </dynamic>
        ORDER
        BY
        updateTime desc,
        isShow desc
    </select>

posted on 2016-01-11 18:12  bobo327  阅读(5305)  评论(0编辑  收藏  举报