@RequestMapping(value = {"list", ""}) public String list( Poto poto, HttpServletRequest request, HttpServletResponse response, Model model) { Page<Poto> page = potoService.findPage(new Page<Poto>(request, response), poto); model.addAttribute("page", page); return "modules/poto/potoList"; }
@ModelAttribute public Poto get(@RequestParam(required = false) String id) { Poto entity = null; if (StringUtils.isNotBlank(id)) { entity = potoService.get(id); } if (entity == null) { entity = new Poto(); } return entity; }
@RequestMapping(value = "delete") public String delete(Poto poto, RedirectAttributes redirectAttributes) { potoService.delete(poto); addMessage(redirectAttributes, "删除poto成功"); return "redirect:" + Global.getAdminPath() + "/poto/poto/?repage"; }