Example #1
0
 @RequestMapping("/agency/sendNotice.do")
 public String sendeNotice(String id) {
   Notice notice = service.getNotice(id);
   service.doIssueNotice(notice);
   addMessage("发布公告成功!");
   return "redirect:" + getPrePath() + "listNotice.do";
 }
Example #2
0
 @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";
 }
Example #3
0
 @RequestMapping("/agency/deleteNotice.do")
 public String deleteNotice(String id, String[] ids) {
   if (StringUtils.isNotBlank(id)) {
     Notice notice = service.getNotice(id);
     service.deleteNotice(notice);
   } else {
     service.deleteNotice(ids);
   }
   addMessage("删除公告成功!");
   return "redirect:" + getPrePath() + "listNotice.do";
 }
Example #4
0
 /**
  * 代理商
  *
  * @param dto
  * @return
  */
 @RequestMapping("/agency/listNotice.do")
 public String listNotice(SystemDto dto) {
   dto.setAgency(SpringHelper.getCurrentAgency().getId());
   Pagination pagination = service.queryPage(dto);
   this.getRequest().setAttribute("pagination", pagination);
   this.getRequest().setAttribute("systemDto", dto);
   return AGENCY_PRE_JSP_PATH + "noticeList";
 }
Example #5
0
 @RequestMapping("/provider/listNotice.do")
 public String providerlistNotice(SystemDto dto) {
   dto.setProvider(SpringHelper.getCurrentProvider().getId());
   Pagination pagination = service.queryPage(dto);
   this.getRequest().setAttribute("pagination", pagination);
   this.getRequest().setAttribute("systemDto", dto);
   return PROVIDER_PRE_JSP_PATH + "noticeList";
 }
Example #6
0
 @RequestMapping("/system/listNotice.do")
 public String systemlistNotice(SystemDto dto) {
   dto.setNoticeType(Notice.NOTICE_TYPE_ISSUED);
   Pagination pagination = service.queryPageList(dto);
   this.getRequest().setAttribute("pagination", pagination);
   this.getRequest().setAttribute("systemDto", dto);
   return getJspPrePath() + "noticeReadOnly";
 }
Example #7
0
  /**
   * 公告详细信息
   *
   * @param dto
   * @return
   */
  @RequestMapping("/agency/viewNotice.do")
  public String viewNotice(SystemDto dto) {
    Notice notice = service.getNotice(dto.getId());
    if (!service.isReadNotice(SpringHelper.getCurrentUser(), notice)) {
      NoticeReadNote readn = new NoticeReadNote();
      readn.setNotice(notice);
      readn.setReaderId(SpringHelper.getCurrentUser().getId());
      readn.setReaderName(SpringHelper.getCurrentUser().getUserName());
      readn.setReadTime(new Date());
      service.saveNoticeReadNote(readn);
    }
    long count = ServiceLocator.getNoticeService().getUnreadCount(SpringHelper.getCurrentUser());
    this.getSession().setAttribute(Constants.REQUEST_MESSAGELINK, count);

    this.getRequest().setAttribute("notice", notice);
    return COMPANY_PRE_JSP_PATH + "noticeInfo";
  }
Example #8
0
 @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";
 }
Example #9
0
 @RequestMapping("/agency/editNotice.do")
 public String editNotice(SystemDto dto) {
   Notice notice = service.getNotice(dto.getId());
   this.getRequest().setAttribute("notice", notice);
   return AGENCY_PRE_JSP_PATH + "sendnotice";
 }