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"; }
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"; }
public String preOrder() { Map session = ActionContext.getContext().getSession(); account = (Account) session.get("account"); orderId = System.currentTimeMillis() + "" + account.getId(); orderTime = new Date(); return "success"; }
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"; }
public void loadSendMsgs() { Map session = ActionContext.getContext().getSession(); Account act = (Account) session.get("account"); sendMsgs = msgService.getSendMsg(act.getId()); }
public void listOrder() { Map session = ActionContext.getContext().getSession(); Account act = (Account) session.get("account"); orders = orderService.listOrders(act.getId()); }