@RequiresPermissions("luxclub:messageNotify:edit")
 @RequestMapping(value = "delete")
 public String delete(MessageNotify messageNotify, RedirectAttributes redirectAttributes) {
   messageNotifyService.delete(messageNotify);
   addMessage(redirectAttributes, "删除消息通知成功");
   return "redirect:" + Global.getAdminPath() + "/luxclub/messageNotify/?repage";
 }
 @RequiresPermissions("luxclub:messageNotify:edit")
 @RequestMapping(value = "save")
 public String save(
     MessageNotify messageNotify, Model model, RedirectAttributes redirectAttributes) {
   if (!beanValidator(model, messageNotify)) {
     return form(messageNotify, model);
   }
   messageNotifyService.save(messageNotify);
   addMessage(redirectAttributes, "保存消息通知成功");
   return "redirect:" + Global.getAdminPath() + "/luxclub/messageNotify/?repage";
 }
 @ModelAttribute
 public MessageNotify get(@RequestParam(required = false) Long id) {
   MessageNotify entity = null;
   if (id != null) {
     entity = messageNotifyService.get(id);
   }
   if (entity == null) {
     entity = new MessageNotify();
   }
   return entity;
 }
 @RequiresPermissions("luxclub:messageNotify:view")
 @RequestMapping(value = {"list", ""})
 public String list(
     MessageNotify messageNotify,
     HttpServletRequest request,
     HttpServletResponse response,
     Model model) {
   Page<MessageNotify> page =
       messageNotifyService.findPage(new Page<MessageNotify>(request, response), messageNotify);
   for (MessageNotify msgNotify : page.getList()) {
     String receiver = msgNotify.getReceiver();
     if (StringUtils.isNotBlank(receiver) && StringUtils.isNumeric(receiver)) {
       User user = UserUtils.get(Long.parseLong(receiver));
       if (user != null) {
         msgNotify.setReceiverName(user.getName());
       }
     } else {
       msgNotify.setReceiverName(receiver);
     }
   }
   model.addAttribute("page", page);
   return "modules/luxclub/messageNotifyList";
 }