其他分享
首页 > 其他分享> > 批量插入数据@Insert

批量插入数据@Insert

作者:互联网

// 批量插入数据 @Insert("<script>" + "insert into index_kline (currency_id, currency, zone, period, high, open, close, low, vol, date_time) " + "values " + "<foreach collection='kLines' item='kLine' index='index' separator=','>" + "(#{kLine.currencyId}, #{kLine.currency}, #{kLine.zone}, #{kLine.period}, #{kLine.high}, #{kLine.open}, #{kLine.close}, #{kLine.low}, #{kLine.vol}, #{kLine.dateTime})" + "</foreach>" + "</script>") void addBatch(@Param("kLines") List<IndexKLine> kLines);

标签:Insert,批量,插入,vol,kLine,period,high,currency,close
来源: https://www.cnblogs.com/zhuyeshen/p/10956926.html