|
|
|
|
@@ -1,6 +1,8 @@
|
|
|
|
|
package com.wb.domainserver.domain.mngr.bbs.rvw.controller;
|
|
|
|
|
|
|
|
|
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
|
|
|
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
|
|
|
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.bbs.bbs.service.BOBbsService;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.bbs.bbs.vo.BOBbsVO;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.service.BOGnrlbbscttService;
|
|
|
|
|
@@ -84,6 +86,8 @@ public class RvwController {
|
|
|
|
|
private BOMssageService boMssageService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOOrdrService boOrdrService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PaginationProperties paginationProperties;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 게시글 목록 조회 팝업 (검색 section)
|
|
|
|
|
@@ -177,67 +181,55 @@ public class RvwController {
|
|
|
|
|
@RequestMapping(value = "/selectRvwListInqire")
|
|
|
|
|
public String selectRvwListInqire(BOGnrlbbscttVO bbsctt, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
|
|
|
|
bbsctt.setSopmalCd(authSopmalCd);
|
|
|
|
|
//게시글 노출 항목 설정값과 게시판 목록 조회
|
|
|
|
|
Map<String, Object> content = new HashMap<String, Object>();
|
|
|
|
|
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {
|
|
|
|
|
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {//사용자 조회 일 경우
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
bbsctt.setMbrDvCd(user.getMbrDvCd());
|
|
|
|
|
bbsctt.setMbrInnb(user.getUserInnb());
|
|
|
|
|
}
|
|
|
|
|
if ("mpage".equals(bbsctt.getReqUrl()) || "crm".equals(bbsctt.getReqUrl())) {
|
|
|
|
|
|
|
|
|
|
if (!"crm".equals(bbsctt.getReqUrl())) {
|
|
|
|
|
if (user.getUserInnb() > 0) {
|
|
|
|
|
bbsctt.setRegusr(user.getUserInnb());
|
|
|
|
|
bbsctt.setRegusrDvCd("01");
|
|
|
|
|
if ("sopmal".equals(bbsctt.getServerDv())) {
|
|
|
|
|
bbsctt.setRegusrDvCd("01");
|
|
|
|
|
} else {
|
|
|
|
|
bbsctt.setRegusrDvCd("02");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
bbsctt.setRegusr(0);
|
|
|
|
|
bbsctt.setRegusrDvCd("99");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// pagination
|
|
|
|
|
PaginationInfo paginationInfo = new PaginationInfo();
|
|
|
|
|
paginationInfo.setCurrentPageNo(bbsctt.getPageIndex());
|
|
|
|
|
paginationInfo.setRecordCountPerPage(bbsctt.getPageUnit());
|
|
|
|
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
|
|
|
|
|
|
|
|
|
bbsctt.setPaginationInfo(paginationInfo);
|
|
|
|
|
bbsctt.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
|
|
|
|
bbsctt.setLastIndex(paginationInfo.getLastRecordIndex());
|
|
|
|
|
bbsctt.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
|
|
|
|
|
|
|
|
|
// 게시글 목록조회
|
|
|
|
|
Map<String, Object> resultList = new HashMap<String, Object>();
|
|
|
|
|
resultList = service.selectBOBbscttListInqire(bbsctt);
|
|
|
|
|
|
|
|
|
|
// 게시판 설정 정보 조회
|
|
|
|
|
BOBbsVO bbsVO = new BOBbsVO();
|
|
|
|
|
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
|
|
|
|
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
|
|
|
|
bbsVO.setBbsId(bbsctt.getBbsId());
|
|
|
|
|
bbsVO.setBbsTyCd(bbsctt.getBbsTyCd());
|
|
|
|
|
// 게시판 설정 정보 조회
|
|
|
|
|
DataMap bbsInfo = new DataMap();
|
|
|
|
|
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
|
|
|
|
DataMap content = new DataMap();
|
|
|
|
|
|
|
|
|
|
//사용자에서 이벤트 폼 조회시 해당 쇼핑몰 이벤트 게시판 정보 조회(이벤트,당첨자발표 게시판)
|
|
|
|
|
List<DataMap> evtBbsList = new ArrayList<>();
|
|
|
|
|
if ("sopmal".equals(bbsctt.getServerDv())) {
|
|
|
|
|
if ("03".equals((String) bbsInfo.get("bbsTyCd")) || "11".equals((String) bbsInfo.get("bbsTyCd"))) {
|
|
|
|
|
evtBbsList = bbsService.selectBOEvtBbsList(bbsVO);
|
|
|
|
|
content.put("evtBbsList", evtBbsList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 분류 조회
|
|
|
|
|
List<DataMap> itmList = new ArrayList<>();
|
|
|
|
|
itmList = service.selectBOBbscttItmInqire(bbsctt);
|
|
|
|
|
|
|
|
|
|
// 게시판 목록 조회 및 게시글 개수 조회(관리자 페이지)
|
|
|
|
|
List<DataMap> bbsListCnt = new ArrayList<>();
|
|
|
|
|
if (!"01".equals(user.getSysDvCd())) {
|
|
|
|
|
bbsListCnt = bbsService.selectBOBbsttListInqire(bbsVO);
|
|
|
|
|
content.put("bbsListCnt", bbsListCnt);
|
|
|
|
|
}
|
|
|
|
|
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
|
|
|
|
Map<String, Object> rvwQesitmList = new HashMap<String, Object>();
|
|
|
|
|
//리뷰 목록 조회일 시 service 호출
|
|
|
|
|
if ("rvw".equals(bbsctt.getRvwBbscttDv())) {
|
|
|
|
|
//추가항목 리스트, 추가항목 항목 리스트(리뷰)
|
|
|
|
|
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
|
|
|
|
//리뷰항목 리스트, 리뷰항목 항목 리스트
|
|
|
|
|
rvwQesitmList = service.selectBOStarItm(bbsctt);
|
|
|
|
|
}
|
|
|
|
|
content.put("bbsInfo", bbsInfo);
|
|
|
|
|
content.put("itmList", itmList);
|
|
|
|
|
if ("rvw".equals(bbsctt.getRvwBbscttDv())) {
|
|
|
|
|
content.put("qesitmList", qesitmList);
|
|
|
|
|
content.put("rvwQesitmList", rvwQesitmList);
|
|
|
|
|
}
|
|
|
|
|
content.put("bbsctt", bbsctt);
|
|
|
|
|
|
|
|
|
|
content.put("resultList", resultList);
|
|
|
|
|
content.put("paginationInfo", bbsctt.getPaginationInfo());
|
|
|
|
|
model.addAttribute("resultMap",content);
|
|
|
|
|
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
|