public static int executeUpdate(Connection conn, String sql, List<Object> parameters) throws SQLException {
        PreparedStatement stmt = null;

        int updateCount;
        try {
            stmt = conn.prepareStatement(sql);

            setParameters(stmt, parameters);

            updateCount = stmt.executeUpdate();
        } finally {
            JdbcUtils.close(stmt);
        }

        return updateCount;
    }
jdbc utils

@author jingwk
@ClassName JdbcUtils
@Version 2.1.1
@since 2020/03/14 07:15
larkmidtable-web/larkmt-admin/src/main/java/com/larkmt/cn/admin/util/JdbcUtils.java