void batchSave(@Param("relationList") List<ReqDocRelations> relationList);
void batchDelete(@Param("id")List<Long> ids);
<!-- 根据id 批量删除 -->
<delete id="batchDelete" parameterType="java.lang.Long">
delete from doc_relation
where id in
<foreach collection="id" index="index" item="list" open="("
separator="," close=")">
#{list,jdbcType=BIGINT}
</foreach>
</delete>
<!-- 根据id 批量删除 -->
<insert id="batchSave" parameterType="web.request.ReqDocRelations">
insert into doc_relation (id, hospital_id, tablea_id,
tablea_col_id, tablea_col_index, tableb_id,
tableb_col_id, tableb_col_index)
values
<foreach collection="relationList" item="list" index="index" separator="," >
(#{list.id,jdbcType=BIGINT}, #{list.hospitalId,jdbcType=BIGINT}, #{list.tableaId,jdbcType=BIGINT},
#{list.tableaColId,jdbcType=BIGINT}, #{list.tableaColIndex,jdbcType=VARCHAR}, #{list.tablebId,jdbcType=BIGINT},
#{list.tablebColId,jdbcType=BIGINT}, #{list.tablebColIndex,jdbcType=VARCHAR})
</foreach>
</insert>