sql 遍历list

<select id="findadminSaleList" parameterClass="java.util.Map" resultClass="java.util.HashMap">
       
        select * from T_BD_ACCE t where     
       
            <isNotEmpty prepend="" property="userid">
                 t.userid IN 
                <iterate property="userid" open="(" close=")" conjunction=",">
                    #userid[]#
                </iterate>
            </isNotEmpty>
                 <isNotEmpty prepend="AND" property="createDateStart">
                <![CDATA[
                    AECE_DATE >=  TO_DATE(#createDateStart#,'yyyy-mm-dd')
                ]]>
            </isNotEmpty>
            <isNotEmpty prepend="AND" property="createDateEnd">
                <![CDATA[
                    AECE_DATE <= TO_DATE(#createDateEnd#,'yyyy-mm-dd')
                ]]>
            </isNotEmpty>
           
       </select>

 

posted @ 2017-02-15 16:51  Vip灬cnblog  阅读(902)  评论(0编辑  收藏  举报