コード例 #1
0
ファイル: NoticeController.java プロジェクト: kingoin/kgecp
 /**
  * 代理商
  *
  * @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";
 }
コード例 #2
0
ファイル: NoticeController.java プロジェクト: kingoin/kgecp
 @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";
 }
コード例 #3
0
ファイル: NoticeController.java プロジェクト: kingoin/kgecp
 @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";
 }
コード例 #4
0
ファイル: NoticeController.java プロジェクト: kingoin/kgecp
  /**
   * 公告详细信息
   *
   * @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";
  }
コード例 #5
0
ファイル: NoticeController.java プロジェクト: kingoin/kgecp
 @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";
 }