Exemplo n.º 1
0
 @RequiresPermissions("zb:zbUser:edit")
 @RequestMapping(value = "delete")
 public String delete(ZbUser zbUser, RedirectAttributes redirectAttributes) {
   zbUserService.delete(zbUser);
   addMessage(redirectAttributes, "删除用户成功");
   return "redirect:" + Global.getAdminPath() + "/zb/zbUser/?repage";
 }
Exemplo n.º 2
0
 @RequiresPermissions("zb:zbUser:view")
 @RequestMapping(value = {"list", ""})
 public String list(
     ZbUser zbUser, HttpServletRequest request, HttpServletResponse response, Model model) {
   Page<ZbUser> page = zbUserService.findPage(new Page<ZbUser>(request, response), zbUser);
   model.addAttribute("page", page);
   return "modules/zb/zbUserList";
 }
Exemplo n.º 3
0
 @RequiresPermissions("zb:zbUser:edit")
 @RequestMapping(value = "save")
 public String save(ZbUser zbUser, Model model, RedirectAttributes redirectAttributes) {
   if (!beanValidator(model, zbUser)) {
     return form(zbUser, model);
   }
   zbUserService.save(zbUser);
   addMessage(redirectAttributes, "保存用户成功");
   return "redirect:" + Global.getAdminPath() + "/zb/zbUser/?repage";
 }
Exemplo n.º 4
0
 @ModelAttribute
 public ZbUser get(@RequestParam(required = false) String id) {
   ZbUser entity = null;
   if (StringUtils.isNotBlank(id)) {
     entity = zbUserService.get(id);
   }
   if (entity == null) {
     entity = new ZbUser();
   }
   return entity;
 }