Exemplo n.º 1
0
  /** hkf 子账号列表 2013.1.9 */
  @POST
  public String list_json() {
    Map paramsMap = this.getParams();
    paramsMap = SysUtil.removeFilter(paramsMap);
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);
    paramsMap.put("partyid", sessionBean.getPartyid());
    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    String backlist = operatorService.selectPageByKey(paramsMap);

    HttpServletResponse response = this.getResponseHelper().getResponse();
    return new JsonResponse().responseJson(response, backlist);
  }
Exemplo n.º 2
0
  /** hkf 删除子账号 2013.1.9 */
  @GET
  public String delete() {
    Map map = this.getParams();
    map = SysUtil.removeFilter(map);
    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);
    map.put("partyid", sessionBean.getPartyid());
    String msg = operatorService.delete(map);
    String jsonmsg = JsonGenerateUtil.getMsgJson(msg);
    HttpServletResponse response = this.getResponseHelper().getResponse();

    return new JsonResponse().responseJson(response, jsonmsg);
  }
Exemplo n.º 3
0
  /**
   * hkf 用partyid查询admin操作员信息 2013.7.11
   *
   * @return
   */
  @GET
  public String selectMsgByPartyid() {
    Map paramsMap = new HashMap();
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);

    paramsMap.put("partyid", sessionBean.getPartyid());
    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    String str = operatorService.selectAdminMsgByPartyid(paramsMap);

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

    return new JsonResponse().responseJson(response, str);
  }
Exemplo n.º 4
0
  /**
   * hkf 更新操作员信息
   *
   * <p>2013.1.15
   */
  @POST
  public String updateoperatormsg() {
    Map map = this.getParams();
    map = SysUtil.removeFilter(map);
    // String operator=SysUtil.getDecode(this.getParam("operator").toString());
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);
    map.put("partyid", sessionBean.getPartyid());
    //	map.put("partyid", "1");
    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    String msg = operatorService.updateoperatormsg(map);
    msg = JsonGenerateUtil.getMsgJson(msg);

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

    return new JsonResponse().responseJson(response, msg);
  }
Exemplo n.º 5
0
  /** hkf 验证子账号名 2013.1.9 */
  @GET
  public String checkoperator() {
    String operator = SysUtil.getDecode(this.getParam("operator").toString());
    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    HttpServletResponse response = this.getResponseHelper().getResponse();
    if (operator.equals("admin")) {
      String jsonmsg = JsonGenerateUtil.getMsgJson("sorry");
      return new JsonResponse().responseJson(response, jsonmsg);
    }

    Map map = new HashMap();
    map.put("operator", operator);
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);
    map.put("partyid", sessionBean.getPartyid());
    String msg = operatorService.checkoperator(map);
    msg = JsonGenerateUtil.getMsgJson(msg);
    return new JsonResponse().responseJson(response, msg);
  }
Exemplo n.º 6
0
  /** hkf 根据operatorid查询操作员 */
  @GET
  public String list_query_detail_json() {
    String id = this.getParam("id").toString();

    Map map = new HashMap();

    if (id.contains("/")) {
      map.put("operatorid", id.split("/")[0]);
    } else {
      map.put("operatorid", id);
    }
    // map.put("operator", id.split("/")[1]);
    HttpServletRequest request = this.getResponseHelper().getRequest();
    SessionBean sessionBean = SessionUtil.getSession(request);

    map.put("partyid", sessionBean.getPartyid());
    OperatorService operatorService =
        (OperatorService) SofaSpringContext.getBean("operatorService");
    String msg = operatorService.selectbyid(map);
    HttpServletResponse response = this.getResponseHelper().getResponse();
    return new JsonResponse().responseJson(response, msg);
  }
Exemplo n.º 7
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);
  }