コード例 #1
0
  /**
   * 사용중인 게시판 속성 정보의 목록을 조회 한다.
   *
   * @param boardMasterVO
   * @param model
   * @return
   * @throws Exception
   */
  @RequestMapping("/cop/bbs/selectBdMstrListByTrget.do")
  public String selectBdMstrListByTrget(
      @ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model) throws Exception {
    checkAuthority(boardMasterVO); // server-side 권한 확인

    boardMasterVO.setPageUnit(propertyService.getInt("pageUnit"));
    boardMasterVO.setPageSize(propertyService.getInt("pageSize"));

    PaginationInfo paginationInfo = new PaginationInfo();

    paginationInfo.setCurrentPageNo(boardMasterVO.getPageIndex());
    paginationInfo.setRecordCountPerPage(boardMasterVO.getPageUnit());
    paginationInfo.setPageSize(boardMasterVO.getPageSize());

    boardMasterVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
    boardMasterVO.setLastIndex(paginationInfo.getLastRecordIndex());
    boardMasterVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());

    Map<String, Object> map = bbsAttrbService.selectBdMstrListByTrget(boardMasterVO);
    int totCnt = Integer.parseInt((String) map.get("resultCnt"));
    paginationInfo.setTotalRecordCount(totCnt);

    model.addAttribute("resultList", map.get("resultList"));
    model.addAttribute("resultCnt", map.get("resultCnt"));
    model.addAttribute("paginationInfo", paginationInfo);
    model.addAttribute("trgetId", boardMasterVO.getTrgetId());

    return "cop/bbs/EgovBBSListByTrget";
  }
コード例 #2
0
  /**
   * 게시판 마스터 선택 팝업을 위한 목록을 조회한다.
   *
   * @param boardMasterVO
   * @param model
   * @return
   * @throws Exception
   */
  @RequestMapping("/cop/bbs/SelectBBSMasterInfsPop.do")
  public String selectBBSMasterInfsPop(
      @ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model) throws Exception {
    boardMasterVO.setPageUnit(propertyService.getInt("pageUnit"));
    boardMasterVO.setPageSize(propertyService.getInt("pageSize"));

    PaginationInfo paginationInfo = new PaginationInfo();

    paginationInfo.setCurrentPageNo(boardMasterVO.getPageIndex());
    paginationInfo.setRecordCountPerPage(boardMasterVO.getPageUnit());
    paginationInfo.setPageSize(boardMasterVO.getPageSize());

    boardMasterVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
    boardMasterVO.setLastIndex(paginationInfo.getLastRecordIndex());
    boardMasterVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());

    boardMasterVO.setUseAt("Y");

    Map<String, Object> map = bbsAttrbService.selectNotUsedBdMstrList(boardMasterVO);
    int totCnt = Integer.parseInt((String) map.get("resultCnt"));

    paginationInfo.setTotalRecordCount(totCnt);

    model.addAttribute("resultList", map.get("resultList"));
    model.addAttribute("resultCnt", map.get("resultCnt"));
    model.addAttribute("paginationInfo", paginationInfo);

    return "cop/bbs/EgovBoardMstrListPop";
  }