diff --git a/hutool-db/src/main/java/cn/hutool/db/StatementUtil.java b/hutool-db/src/main/java/cn/hutool/db/StatementUtil.java index 34f4375600..efa1b8149e 100644 --- a/hutool-db/src/main/java/cn/hutool/db/StatementUtil.java +++ b/hutool-db/src/main/java/cn/hutool/db/StatementUtil.java @@ -163,8 +163,9 @@ public static PreparedStatement prepareStatementForBatch(Connection conn, String sql = sql.trim(); SqlLog.INSTANCE.log(sql, paramsBatch); PreparedStatement ps = conn.prepareStatement(sql); + Map nullTypeMap = new HashMap<>(); for (Object[] params : paramsBatch) { - StatementUtil.fillParams(ps, params); + StatementUtil.fillParams(ps, params, nullTypeMap); ps.addBatch(); } return ps;