【mybatis】注解批量插入


    @Insert({
            "<script>",
            "insert into people(name, age, sex) values ",
            "<foreach collection='peopleList' item='item' index='index' separator=','>",
            "(#{item.name}, #{item.age}, #{item.sex})",
            "</foreach>",
            "</script>"
    })
    int insertCollectList(@Param(value="peopleList") List<People> peopleList);

 

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页