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