// 批量插入数据
@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);
原文地址:https://www.cnblogs.com/zhuyeshen/p/10956926.html
时间: 2024-10-30 09:49:06