mybatis的oracle的in超过1000的写法

<if test="preIds != null and preIds.size() > 0">
AND PRE_ID IN
<trim suffixOverrides=" OR PRE_ID IN ()">
<foreach collection='preIds' open='(' close=')' index='index' item='item'>
<if test="index != 0">
<choose>
<when test="index % 1000 == 999">) OR PRE_ID IN (</when>
<otherwise>,</otherwise>
</choose>
</if>
#{item}
</foreach>
</trim>
</if>

原文地址:https://www.cnblogs.com/YuyuanNo1/p/8854218.html