예제 #1
0
  /** @author hkf 更新密码 */
  @POST
  public String update() {
    Map paramsMap = this.getParams();
    paramsMap = SysUtil.removeFilter(paramsMap);
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);

    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    paramsMap.put("partyid", sessionBean.getPartyid());
    paramsMap.put("operator", sessionBean.getOperator());
    HttpServletResponse response = this.getResponseHelper().getResponse();
    String msg = operatorService.update(paramsMap);
    return new JsonResponse().responseJson(response, msg);
  }
예제 #2
0
  /** hkf 判断是否为admin账户 2013.5.20 */
  @GET
  public String checkOperatocPermission() {
    String per = "";
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);

    String oper = (String) sessionBean.getOperator();
    if (oper.equals("admin")) {
      per = "ok";
    }
    per = JsonGenerateUtil.getMsgJson(per);

    HttpServletResponse response = this.getResponseHelper().getResponse();

    return new JsonResponse().responseJson(response, per);
  }