Esempio n. 1
0
  /** hkf 重置密码 2013.1.15 */
  @POST
  public String updateoldpassword() {
    Map map = this.getParams();
    map = SysUtil.removeFilter(map);
    map.put("password", MD5.md5("123456s"));
    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    String msg = operatorService.updateoldpassword(map);
    msg = JsonGenerateUtil.getMsgJson(msg);

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

    return new JsonResponse().responseJson(response, msg);
  }
Esempio n. 2
0
  /** hkf 插入操作员 2013.1.10 */
  @POST
  public String save() {
    Map map = this.getParams();
    map = SysUtil.removeFilter(map);
    Map mymap = new HashMap();
    mymap.put("operator", map.get("username"));
    mymap.put("realname", map.get("realname"));
    mymap.put("mobilenumber", map.get("mobileInfo"));
    mymap.put("telephonenumber", map.get("tel"));
    mymap.put("password", MD5.md5(map.get("pwd").toString()));
    mymap.put("securitypermission", map.get("securitypermission"));
    //		mymap.put("partyid", "1");
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);
    mymap.put("partyid", sessionBean.getPartyid());

    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    String msg = operatorService.save(mymap);
    msg = JsonGenerateUtil.getMsgJson(msg);

    HttpServletResponse response = this.getResponseHelper().getResponse();
    return new JsonResponse().responseJson(response, msg);
  }