Esempio n. 1
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";
  }
Esempio n. 2
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";
 }