src/org/nutz/dao/impl/sql/SqlTemplate.java
public int batchUpdate(String sql,
                           Map<String, Object> vars,
                           List<Map<String, Object>> batchValues) {
        Sql sqlObj = null;
        if (batchValues != null && batchValues.size() > 0) {
            sqlObj = createSqlObj(sql, batchValues.get(0));
            for (Map<String, Object> params : batchValues) {
                Map<String, Object> newParams = paramProcess(params);
                sqlObj.params().putAll(newParams);
                sqlObj.addBatch();
            }
            dao.execute(sqlObj);
        } else {
            sqlObj = createSqlObj(sql, null);
            execute(sqlObj, vars, null);
        }

        return sqlObj.getUpdateCount();
    }
public int batchUpdate(String sql,
                           Map<String, Object> vars,
                           List<Map<String, Object>> batchValues) {
        Sql sqlObj = null;
        if (batchValues != null && batchValues.size() > 0) {
            sqlObj = createSqlObj(sql, batchValues.get(0));
            for (Map<String, Object> params : batchValues) {
                Map<String, Object> newParams = paramProcess(params);
                sqlObj.params().putAll(newParams);
                sqlObj.addBatch();
            }
            dao.execute(sqlObj);
        } else {
            sqlObj = createSqlObj(sql, null);
            execute(sqlObj, vars, null);
        }

        return sqlObj.getUpdateCount();
    }
执行SQL批量更新操作（如插入，更新或删除语句）。

@param sql
包含变量占位符的SQL
@param vars
变量map，无参数时，可为null
@param batchValues
批量更新参数集合

@return SQL 语句所影响的行数