ibatis 条件批量查询查询

    <select id="getPhoneModifyLogsByPhones" resultType="com.mobanker.tkj.cust.info.entity.PhoneModifyLog" parameterType="java.util.List">
        SELECT * FROM T_PHONE_MODIFY_LOG WHERE 1=1
        <foreach collection="list" index="index" item="phone" open="AND pre_phone IN ("
                         separator="," close=")">
                  #{phone}
        </foreach>
    </select>

猜你喜欢

转载自terry0501.iteye.com/blog/2304055