mybatis mapper insertList

记录一下,小坑,下面是正确的书写方式:

<insert id="insertBatch">
        insert into welian_userprofile.first_login_log(uid,first_login_time) 
        values
            <foreach collection="list" item="item" index="index" separator="," >
                (#{item.uid},#{item.firstLoginTime})
            foreach>
    insert>

你可能感兴趣的:(java)