Mybatis 实现 arrayList批量添加
mapper层
void insertBloodPressureData(ArrayList<records> purchaseOrders);
mybatis
<insert id="insertBloodPressureData" parameterType="java.util.List">
insert into blood_pressure_data (sbp,dbp,pulse,risk)
values
<foreach collection="list" item="productCategory" index="index" separator=",">
(
#{productCategory.sbp},
#{productCategory.dbp},
#{productCategory.pulse},
#{productCategory.risk})
</foreach>
</insert>