mybatis的批量插入
阿新 • • 發佈:2018-12-18
@Insert({ "<script>", "insert into location.cur_loc_ibeacon_class (class_id, zone_id, ", "lat, lon, datajson, ", "posttime, column_id, ", "map_id, building, ", "level, is_del) values ", "<foreach collection='list' item='item' index='index' separator=','>", "(#{item.classId}, #{item.zoneId},#{item.lat}, #{item.lon}, #{item.datajson},#{item.posttime},#{item.columnId},#{item.mapId},#{item.building},#{item.level},#{item.isDel})", "</foreach>", "</script>" }) int bulkInsert(List<LocIbeaconClass> record);