code: public static void sqlRS(Connection conn, String sql, Consumer<ResultSet> consumer) {
          try (Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(sql)) {
              consumer.accept(rs);
          } catch (SQLException e) {
              logger.error(e.getMessage(), e);
          }
      }
docs: sql执行获取resultSet
  
  @param conn sql connection
  @param sql sql
  @param consumer 回调方法