MyBatis 基于注解的批量插入数据
    @Insert({"<script>",
            "insert into tmc_constract_detail ",
            "<foreach collection='list'  item='record' index = 'index' separator=','>",
            "values(",
            "#{record.constractId,jdbcType=VARCHAR}, #{record.modifyCode,jdbcType=VARCHAR}, " +
                    "#{record.constractStatus,jdbcType=VARCHAR}, #{record.updateDate,jdbcType=DATE}, " +
                    "#{record.userId,jdbcType=VARCHAR}, #{record.description,jdbcType=VARCHAR} ",
            "</foreach> ",
            ")</script>"})
    void updatesStatus(List<TmcConstractDetail> records);

参商
52 声望3 粉丝

掌控自己,掌控敌人