Exemplo n.º 1
0
 public String delete() throws Exception {
   String id = super.request.getParameter("id");
   User deleteUser = new User();
   deleteUser.setId(Integer.parseInt(id));
   userService.delete(deleteUser);
   Result result = new Result();
   result.setSuccess(true);
   result.addDefaultModel("userId", id);
   super.toVm(result);
   return SUCCESS;
 }
Exemplo n.º 2
0
 public String update() throws Exception {
   String id = super.request.getParameter("id");
   Result result = null;
   if (StringUtils.isEmpty(id)) {
     result = new Result();
     result.setSuccess(false);
     result.addDefaultModel("message", "not get id");
   } else {
     result = userService.findUserById(id);
   }
   super.toVm(result);
   return SUCCESS;
 }