@RequestMapping("/agency/updateNotice.do") public String updateNotice(String id, String title, String content) { Notice notice = service.getNotice(id); notice.setTitle(title); notice.setContent(content); service.updateNotice(notice); addMessage("修改公告成功!"); return "redirect:" + getPrePath() + "listNotice.do"; }
@RequestMapping("/agency/saveNotice.do") public String saveNotice(String title, String content) { Notice notice = new Notice(); notice.setTitle(title); notice.setContent(content); service.saveNotice(notice); addMessage("保存公告成功!"); return "redirect:" + getPrePath() + "listNotice.do"; }