boolean updateBatchCheckPlan(List<CheckPlan> checkPlans);
boolean updateMdisFbStatusByMdisId(List<MdisInfo> mdisInfos);
boolean insertBatchCheckPlan(List<CheckPlan> checkPlanList);
<update id="updateBatchCheckPlan" parameterType="com.spdb.quality.inspection.task.domain.entity.CheckPlan">
update mon_check_plan set is_enabled=
<foreach collection="list" item="item" index="index" separator=" " open="case rule_no" close="end">
when
</foreach>
where rule_no in
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
</foreach>
</update>
<update id="updateMdisFbStatusByMdisId" parameterType="com.crm.indp.entity.MdisInfo">
update mdis_info
<trim prefix="set" suffixOverrides=",">
<trim prefix="mdis_fb_status = case" suffix="end,">
<foreach collection="list" item="item" index="index">
when mdis_id =
</foreach>
</trim>
<trim prefix="mdis_plan_time = case" suffix="end,">
<foreach collection="list" item="item" index="index">
when mdis_id =
</foreach>
</trim>
</trim>
where mdis_id in
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
</foreach>
</update>
<insert id="insertBatchCheckPlan" keyColumn="plan_id" keyProperty="planId" parameterType="com.spdb.quality.inspection.task.domain.entity.CheckPlan" useGeneratedKeys="true">
insert into mon_check_plan (
rule_no,
rule_group_no,
create_time
)
values
<foreach collection="list" index="index" item="item" separator=",">
(
sysdate()
)
</foreach>
</insert>
- jdbc代码批量插入
![jdbc代码批量插入](https://i-blog.csdnimg.cn/blog_migrate/35ad25962af1f459ea569a50ad47bbfe.png#pic_center)
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/217ba7c2329b1daa71efc4484ad04f3e.png#pic_center)
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/4677ec3f13d4a6e1c95c5e26ef1f1cbc.png#pic_center)