示例#1
0
 /*     */ @Transactional(propagation = Propagation.REQUIRED)
 /*     */ public Integer add(EopSite site, String domain) {
   /* 121 */ WebSessionContext sessonContext = ThreadContextHolder.getSessionContext();
   /*     */
   /* 123 */ EopUser user = (EopUser) sessonContext.getAttribute("eop_user_key");
   /*     */
   /* 125 */ return add(user, site, domain);
   /*     */ }
示例#2
0
  /**
   * 初始化为出厂设置
   *
   * @return
   */
  public String initData() {
    try {
      // 校验验证码
      WebSessionContext<UserContext> sessonContext = ThreadContextHolder.getSessionContext();
      Object realCode =
          sessonContext.getAttribute(ValidCodeServlet.SESSION_VALID_CODE + "initdata");

      if (!vcode.equals(realCode)) {
        this.json = "{result:0,message:'验证码输入错误'}";
        return this.JSON_MESSAGE;
      }
      siteManager.initData();
      this.json = "{result:1}";
    } catch (RuntimeException e) {
      this.json = "{result:0,message:'" + e.getMessage() + "'}";
    }
    return this.JSON_MESSAGE;
  }