【原代码】
<if test="elecTypeCodeList != null and elecTypeCodeList.size()>0">
AND ELEC_TYPE_CODE IN
<foreach item="item" index="index" collection="elecTypeCodeList" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
【修改为】
<if test="elecTypeCodeList != null and elecTypeCodeList.size()>0">
AND ELEC_TYPE_CODE IN
<foreach item="item" index="index" collection="elecTypeCodeList" open="(" separator="," close=")">
<if test="(index % 1000) == 999">NULL) OR ELEC_TYPE_CODE IN (</if>
#{item,jdbcType=VARCHAR}
</foreach>
</if>