Пример #1
0
  private Integer getArticleId() {
    HttpServletRequest httpRequest = ThreadContextHolder.getHttpRequest();
    String url = RequestUtil.getRequestUrl(httpRequest);

    if (url.startsWith("/widget")) return 0;

    String article_id = this.paseArticleId(url);

    return Integer.valueOf(article_id);
  }
Пример #2
0
  protected void display(Map<String, String> params) {
    //	this.setPageFolder("/widgets/cart");
    this.setPageName("pay");
    HttpServletRequest httpRequest = ThreadContextHolder.getHttpRequest();
    String url = RequestUtil.getRequestUrl(httpRequest);
    String[] actions = this.getAction(url);
    if (null == actions) {
      this.showError("参数不正确");
    } else {
      String action = actions[0];
      String pluginid = actions[1];

      if ("to".equals(action)) {
        this.pay();
      } else if ("callback".equals(action)) {
        this.callback(pluginid);
      } else if ("return".equals(action)) {
        this.payReturn(pluginid);
      }
    }
  }