code: public String getQuery(boolean withParams) {
          if (withParams) {
              StringBuffer sql = new StringBuffer(query);
              for (Object param : params) {
                  int index = sql.indexOf("?");
  
                  // 日期
                  StringBuffer str;
                  if (param instanceof Time) {
                      str = new StringBuffer(new SimpleDateFormat("HH:mm:ss").format(param));
                  } else if (param instanceof Date || param instanceof java.sql.Date) {
                      str = new StringBuffer(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(param));
                  } else {
                      str = new StringBuffer(param.toString());
                  }
  
                  // 非数字
                  if (!(param instanceof Number)) {
                      str.insert(0, "'");
                      str.append("'");
                  }
                  sql.replace(index, index + 1, str.toString());
              }
              return sql.toString();
          } else {
              return getQuery();
          }
      }
docs: 获取查询语句
  @param withParams
  @return