示例#1
0
  /**
   * 添加消息反馈信息
   *
   * @return 赵晓晓
   */
  public void getreturnmessage() {

    try {
      // 获得投诉内容
      tousu.setComment(content);
      // 获得添加时间
      tousu.setCreatetime(new Timestamp(System.currentTimeMillis()));
      // 获得登录人编号从session中获得
      HttpSession session = ServletActionContext.getRequest().getSession();
      Customeruser customer = new Customeruser();
      customer = (Customeruser) session.getAttribute("loginuser");
      Long id = customer.getId();
      tousu.setUsername(id.toString());
      // 获得代理编号
      Customeragent customeragent = new Customeragent();
      customeragent = (Customeragent) session.getAttribute("loginagent");
      Long Agentid = customeragent.getId();
      tousu.setDainame(Agentid.toString());
      Server.getInstance().getMemberService().createTousu(tousu);
      System.out.println("添加投诉信息成功!");
    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      System.out.println("添加失败!");
    }
  }
示例#2
0
 public String getfkname(Long id) {
   Customeruser customeruser = Server.getInstance().getMemberService().findCustomeruser(id);
   return customeruser != null && !"".equals(customeruser.getLoginname())
       ? customeruser.getLoginname()
       : "";
 }