mybatis 处理in 1000以上sql
展开查看
点击查看代码
update T_XSGL_XSXX_XJXX xjxx set xjxx.XWZSBH = null, xjxx.ZHXGR = #{userId}, xjxx.ZHXGSJ = sysdate
where exists(select 1 from T_BYGL_XSBYJG byjg where byjg.GDMC is null and byjg.XS_ID = xjxx.XS_ID )
and
( xjxx.XS_ID in
<foreach collection="studentIds" item="val" open="(" close=")" separator="," index="index">
<if test="(index % 999) == 998"> #{val,jdbcType=VARCHAR} ) OR XS_ID in (</if>#{val,jdbcType=VARCHAR}
</foreach>
)
posted on 2023-06-14 18:48 HeavenTang 阅读(41) 评论(0) 收藏 举报
浙公网安备 33010602011771号