1 <!--批量插入-->
2
3 <insert id="batchSave" parameterType="java.util.List">
4 insert into storage_logistic ( plant_name, location, change_time, num, ebeln, ebelp, zid_po, bwart, elikz, mblnr )
5 VALUES
6 <foreach collection="list" item="itm" separator=",">
7 (#{itm.plant_name},#{itm.location},#{itm.change_time},#{itm.num},#{itm.ebeln},#{itm.ebelp},#{itm.zid_po},#{itm.bwart},#{itm.elikz},#{itm.mblnr})
8 </foreach>
9 <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="storage_id">
10 select LAST_INSERT_ID();
11 </selectKey>
12 </insert>
public int batchSave(List<StorageLogisticVo> storagelogisticvo) {
int num = storageLogisticMapper.batchSave(storagelogisticvo);
return num;
}