MyBatis批量存储数据写法

复制代码
<insert id="insertRecordList" parameterType="java.util.List">
        INSERT INTO e_record_access (video_url, access_time, access_address, device_type, device_name,in_out_direction, person_name,
        person_gender, birth_year, person_type, person_library, event_type, card_no, event_result, similarity, living_body, did, person_tag_sign,
        person_tag_name, is_bind, person_id, register_type, use_type, is_unlock) VALUES
        <foreach collection="list" item="item" separator=",">
            (#{item.videoUrl},
            #{item.accessTime},
            #{item.accessAddress},
            #{item.deviceType},
            #{item.deviceName},
            #{item.inOutDirection},
            #{item.personName},
            #{item.personGender},
            #{item.birthYear},
            #{item.personType},
            #{item.personLibrary},
            #{item.eventType},
            #{item.cardNo},
            #{item.eventResult},
            #{item.similarity},
            #{item.livingBody},
            #{item.did},
            #{item.personTagSign},
            #{item.personTagName},
            #{item.isBind},
            #{item.personId},
            #{item.registerType},
            #{item.useType},
            #{item.isUnlock})
        </foreach>
</insert>
复制代码
posted @   黄进广寒  阅读(358)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2019-11-14 switch表达式可使用的类型
2018-11-14 drop、truncate和delete的区别
点击右上角即可分享
微信分享提示