Exemple #1
0
  public String editAccount() {

    Map session = ActionContext.getContext().getSession();
    Account act = (Account) session.get("account");
    account.setId(act.getId());
    actService.updateAccount(account);
    session.put("account", account);
    load();
    return "success";
  }
Exemple #2
0
  public String reqEmpower() {

    Map session = ActionContext.getContext().getSession();
    Account act = (Account) session.get("account");
    if (act.getLevel() == 0 || (act.getLevel() == null)) {
      msgService.sendMsg(act.getId(), 14, "请求授权");
    }
    load();
    return "success";
  }
Exemple #3
0
 public String preOrder() {
   Map session = ActionContext.getContext().getSession();
   account = (Account) session.get("account");
   orderId = System.currentTimeMillis() + "" + account.getId();
   orderTime = new Date();
   return "success";
 }
Exemple #4
0
 public String order() {
   System.out.println("act=" + act);
   Map session = ActionContext.getContext().getSession();
   Account ac = (Account) session.get("account");
   if (act == 0) {
     orderService.addOrder(order, ticketId, ac.getId());
   } else if (act == 1) {
     order.setId(ordId);
     order.setAccount(ac);
     Ticket ticket = ticketServiceImpl.findTicketById(ticketId);
     order.setTicket(ticket);
     System.out.println(order.getId());
     orderService.uptOrder(order);
   }
   load();
   return "success";
 }
Exemple #5
0
 public void loadSendMsgs() {
   Map session = ActionContext.getContext().getSession();
   Account act = (Account) session.get("account");
   sendMsgs = msgService.getSendMsg(act.getId());
 }
Exemple #6
0
 public void listOrder() {
   Map session = ActionContext.getContext().getSession();
   Account act = (Account) session.get("account");
   orders = orderService.listOrders(act.getId());
 }