目的:mybatis 循环插入多条数据

dao

void savaUploadImgInfo(@Param("albumList") List<Album> albumList);

mapper:

<insert id="savaUploadImgInfo" parameterType="java.util.List">
        insert into album values
        <foreach collection="albumList" item="album"  separator="," close=";">
            (#{album.aid}, #{album.aname}, #{album.adescribe}, #{album.aurl}, #{album.aflag}, #{album.acid}, #{album.acreatetime})
        </foreach>
    </insert>

说明:如果你是单数据的   比如: list<String>  collection就要写成  collection="list"