传入list集合实现批量增加SQL:
mapepr:
int insert( List<User> list);
mapper.xml
sql:
<insert id="insert">
insert into user
(user_id,user_name,user_pwd,user_email)
values
<foreach collection="list" item="item" separator=",">
(
null,
#{item.userName},
#{item.userPwd},
#{item.userEmail} ,
)
</foreach>
</insert>