Пример #1
0
 /*    */ public void onAfterOrderCreate(Order order, List<CartItem> itemList, String sessionid)
       /*    */ {
   /* 41 */ IUserService userService = UserServiceFactory.getUserService();
   /* 42 */ Member member = userService.getCurrentMember();
   /* 43 */ if (member != null)
   /*    */ {
     /* 46 */ EopSite site = EopContext.getContext().getCurrentSite();
     /*    */
     /* 48 */ HttpServletRequest request = ThreadContextHolder.getHttpRequest();
     /*    */
     /* 50 */ String domain = RequestUtil.getDomain();
     /*    */
     /* 52 */ EmailModel emailModel = new EmailModel();
     /* 53 */ emailModel.getData().put("username", member.getUname());
     /* 54 */ emailModel.getData().put("sn", order.getSn());
     /* 55 */ emailModel
         .getData()
         .put("createtime", DateUtil.toString(order.getCreate_time(), "yyyy-MM-dd HH:mm:ss"));
     /* 56 */ emailModel.getData().put("sitename", site.getSitename());
     /* 57 */ emailModel.getData().put("logo", site.getLogofile());
     /* 58 */ emailModel.getData().put("domain", domain);
     /*    */
     /* 60 */ emailModel.setTitle("订单提交成功--" + site.getSitename());
     /* 61 */ emailModel.setTo(member.getEmail());
     /* 62 */ emailModel.setTemplate("order_create_email_template.html");
     /* 63 */ this.mailMessageProducer.send(emailModel);
     /*    */ }
   /*    */ }
Пример #2
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);
  }
Пример #3
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);
      }
    }
  }