Пример #1
0
  /** 保存更新对象 */
  public String update() {
    long theuserid = Utils.getSessionUserId(getRequest());
    if (theuserid >= 0) {
      cmsRequestlog.setModifyuser(theuserid);
    }
    cmsRequestlog.setModifytimelong(System.currentTimeMillis());

    cmsRequestlogManager.update(this.cmsRequestlog);

    if ("ajax".equalsIgnoreCase(Utils.getParam(getRequest(), "ajax"))) {
      Map map = new HashMap();
      map.put("obj", cmsRequestlog);
      return writeAjaxResponse(Json.toJson(map));
    } else {
      return OK_JSP;
    }
  }
Пример #2
0
  /** 保存新增对象 */
  public String save() {
    //		cmsRequestlog.setCreateTime(new Date());
    //		cmsRequestlog.setDeleted("0");

    long theuserid = Utils.getSessionUserId(getRequest());
    if (theuserid >= 0) {
      cmsRequestlog.setModifyuser(theuserid);
    }
    cmsRequestlog.setCreatetimelong(System.currentTimeMillis());
    cmsRequestlog.setModifytimelong(System.currentTimeMillis());
    cmsRequestlog.setStatus(0);

    cmsRequestlogManager.save(cmsRequestlog);

    if ("ajax".equalsIgnoreCase(Utils.getParam(getRequest(), "ajax"))) {
      Map map = new HashMap();
      map.put("obj", cmsRequestlog);
      return writeAjaxResponse(Json.toJson(map));
    } else {
      return OK_JSP;
    }
  }