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>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM