mybatis for 循环 中oracle in 条件后 多余1000条处理
select <include refid="WorkOrderSection_Column_List" /> from swo_work_order_section where is_del = 0 <if test="list != null and list.size > 0"> AND (start_code, finish_code) IN <foreach collection="list" item="item" index="index" open="(" close=")"> <if test="index != 0"> <choose> <when test="index % 1000 == 999"> ) OR (start_code, finish_code) IN ( </when> <otherwise>,</otherwise> </choose> </if> ( #{item.startCode,jdbcType=VARCHAR}, #{item.finishCode,jdbcType=VARCHAR} ) </foreach> </if>
----树梢尖上众山小