mybatis_批量插入参数List_Map_String,Object
程序员文章站
2022-06-30 20:48:38
...
mybatis_批量插入参数List<Map<String,Object>>
Dao
int insertCoachMessageInfo(@Param("listInsert")List<Map<String,Object>> listInsert);
xml
insert into coach_message_info(company_id,coach_info_id,title,content,is_checked,create_time)
values
<foreach collection="listInsert" separator="," item="map">
(#{map.companyId},#{map.coachInfo},#{map.title},#{map.content},#{map.is_checked},#{map.create_time})
</foreach>
上一篇: java基础知识-自我总结
下一篇: 自我总结高并发基础