// 내가 가입한 커뮤니티 리스트(가입대기 포함) public List<ComtVo> getCumntUserJoinList(MemberInfo memberInfo) { Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("compId", memberInfo.getCompId()); paramMap.put("userId", memberInfo.getUserId()); paramMap.put("admActYn", "Y"); List<ComtVo> list = communityService.getComntUserJoinList(paramMap); return list; }
// 커뮤니티 게시판 기본 메인화면 - comtLayout/* @RequestMapping(value = "/comtView") public String getComtViewInfo( HttpServletRequest request, @RequestParam Map<String, Object> paramMap, ModelMap model, Authentication authentication) throws Throwable { MemberInfo memberInfo = (MemberInfo) authentication.getPrincipal(); // 현재 커뮤니티의 가입 여부 확인 int joinCnt = getComtJoinYn(memberInfo, paramMap); if (joinCnt == 0) { model.put("errorType", "1"); } paramMap.put("compId", memberInfo.getCompId()); paramMap.put("userId", memberInfo.getUserId()); paramMap.put("admActYn", "Y"); // left 커뮤니티 조회(해당) Map<String, Object> comtInfo = communityService.getUsersComtInfoNm(paramMap); // left 커뮤니티 조회(해당제외) List<ComtVo> list = communityService.getComntUserJoinList(paramMap); // 생성된 게시판 리스트 조회 List<ComtBoardInfoVo> boardInfoList = communityService.getComtBoardInfoList(paramMap); // 해당 커뮤니티의 최신글 조회 paramMap.put("allYn", "Y"); int total = 0; List<ComtBoardVo> boardList = communityService.getComtBoardNewList(paramMap); if (boardList != null && boardList.size() > 0) { total = boardList.size(); } model.put("compId", memberInfo.getCompId()); model.put("joinCnt", joinCnt); model.put("comtInfo", comtInfo); model.put("comtList", list); model.put("comtBdList", boardList); model.put("boardInfoList", boardInfoList); model.put("fcComtId", paramMap.get("fcComtId")); model.put("total", total); return "/comtLayout/comtBoardMain"; }
// 커뮤니티 상세 VIEW @RequestMapping(value = "/comtInfoEdit") public String getComtInfoEditView( @RequestParam Map<String, Object> paramMap, ModelMap model, Authentication authentication) throws Throwable { // Spring Security의 Authentication 객를 주입 MemberInfo memberInfo = (MemberInfo) authentication.getPrincipal(); paramMap.put("compId", memberInfo.getCompId()); paramMap.put("userId", memberInfo.getUserId()); model.put("compId", memberInfo.getCompId()); model.put("comtVo", this.comtMaker(paramMap)); model.put("fcComtId", paramMap.get("fcComtId")); model.addAttribute("useList", this.comtUserMaster(paramMap)); // 현재 커뮤니티의 가입 여부 확인 int joinCnt = getComtJoinYn(memberInfo, paramMap); if (joinCnt == 0) { model.put("errorType", "1"); } // left 커뮤니티 조회(해당) Map<String, Object> comtInfo = communityService.getUsersComtInfoNm(paramMap); paramMap.put("compId", memberInfo.getCompId()); paramMap.put("userId", memberInfo.getUserId()); paramMap.put("admActYn", "Y"); // left 커뮤니티 조회(해당제외) List<ComtVo> list = communityService.getComntUserJoinList(paramMap); // 생성된 게시판 리스트 조회 paramMap.put("userId", memberInfo.getUserId()); List<ComtBoardInfoVo> boardInfoList = communityService.getComtBoardInfoList(paramMap); model.put("compId", memberInfo.getCompId()); model.put("joinCnt", joinCnt); model.put("comtInfo", comtInfo); model.put("comtList", list); model.put("boardInfoList", boardInfoList); return "/cumtMainLayout/left_comtBoardMain/comtViewMain"; }