Bootstrap

mybatis 利用foreach insert 批量插入数据

<insert id="insertAll" parameterType="List">
        INSERT INTO oa_notify_record(
            ID,
            OA_NOTIFY_ID,
            USER_ID,
            READ_FLAG,
            READ_DATE
        )
        <if test="list.get(0).dbName == 'oracle'">
            <foreach collection="list" item="e" separator=" union all ">
                SELECT #{e.id},
                #{e.oaNotify.id},
                #{e.user.id},
                
;