|
|
|
|
@@ -1,25 +1,52 @@
|
|
|
|
|
package com.wb.domainserver.domain.sopmal.mpage.act.controller;
|
|
|
|
|
|
|
|
|
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
|
|
|
|
import com.wb.domainserver.domain.sopmal.csc.vo.GnrlBbscttVO;
|
|
|
|
|
import com.wb.domainserver.domain.sopmal.mpage.act.vo.RvwVO;
|
|
|
|
|
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;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.vo.BODelInfoVO;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.vo.BOGnrlbbscttVO;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.goods.goods.service.BOGoodsService;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.goods.goods.vo.BOGoodsVO;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.mbr.mbr.service.BOMbrService;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.mbr.mlg.service.BOMlgService;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOMlgVO;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.setup.site.service.BOSiteService;
|
|
|
|
|
import com.wb.domainserver.domain.gcone.setup.site.vo.BOSiteVO;
|
|
|
|
|
import com.wb.domainserver.response.WnbtResponse;
|
|
|
|
|
import com.wb.domainserver.response.WnbtResponseBody;
|
|
|
|
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
|
|
|
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
|
|
|
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
|
|
|
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
|
|
|
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
|
|
|
|
import com.wb.domainserver.util.communicate.*;
|
|
|
|
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
|
|
|
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
|
|
|
|
import com.wb.domainserver.util.file.service.FileStorageService;
|
|
|
|
|
import com.wb.domainserver.util.util.Util;
|
|
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.math.BigInteger;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MyActController Class (back)
|
|
|
|
|
*
|
|
|
|
|
@@ -55,6 +82,25 @@ public class MyActController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private FileStorageService filestore;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOGnrlbbscttService service;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOBbsService bbsService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOMlgService mlgService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOGoodsService goodsService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOMbrService boMbrService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOCommonService boCommonService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PaginationProperties paginationProperties;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BOSiteService boSiteService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 상품 Q&A 조회
|
|
|
|
|
* @param bbsctt
|
|
|
|
|
@@ -62,23 +108,27 @@ public class MyActController {
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectGoodsQnaInqire")
|
|
|
|
|
public String selectGoodsQnaInqire(HttpServletRequest request, ModelMap model, GnrlBbscttVO bbsctt){
|
|
|
|
|
public String selectGoodsQnaInqire(HttpServletRequest request, ModelMap model, BOGnrlbbscttVO bbsctt, BOMbrVO vo){
|
|
|
|
|
bbsctt.setBbsTyCd("05");
|
|
|
|
|
bbsctt.setServerDv("sopmal");
|
|
|
|
|
bbsctt.setReqUrl("mpage");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
|
|
|
|
model,
|
|
|
|
|
"resultMap"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
DataMap content = selectBOBbscttListInqire(bbsctt);
|
|
|
|
|
model.addAttribute("resultMap", content);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
|
|
|
|
// model,
|
|
|
|
|
// "resultMap"
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content2 = selectBOMpageInfoInqire(vo);
|
|
|
|
|
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
|
|
|
|
model,
|
|
|
|
|
"mpageResultMap"
|
|
|
|
|
);
|
|
|
|
|
model.addAttribute("mpageResultMap", content2);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
|
|
|
|
// model,
|
|
|
|
|
// "mpageResultMap"
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
return Util.getDeviceType(request)+"/mpage/act/MyGoodsQaR";
|
|
|
|
|
}
|
|
|
|
|
@@ -88,16 +138,23 @@ public class MyActController {
|
|
|
|
|
* @return String
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectGoodsQnaInqireAjax")
|
|
|
|
|
public ResponseEntity<?> selectGoodsQnaInqireAjax(GnrlBbscttVO bbsctt){
|
|
|
|
|
@RequestMapping(value="/selectGoodsQnaInqireAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<?> selectGoodsQnaInqireAjax(BOGnrlbbscttVO bbsctt){
|
|
|
|
|
bbsctt.setBbsTyCd("05");
|
|
|
|
|
bbsctt.setServerDv("sopmal");
|
|
|
|
|
bbsctt.setReqUrl("mpage");
|
|
|
|
|
//게시글 노출 항목 설정값과 게시판 목록 조회
|
|
|
|
|
return responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
|
|
|
|
ReplyFromResrc::getReply
|
|
|
|
|
|
|
|
|
|
DataMap content = selectBOBbscttListInqire(bbsctt);
|
|
|
|
|
return ResponseEntity.ok(
|
|
|
|
|
WnbtResponse.builder()
|
|
|
|
|
.resBody(new WnbtResponseBody(content))
|
|
|
|
|
.build()
|
|
|
|
|
);
|
|
|
|
|
// return responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
|
|
|
|
// ReplyFromResrc::getReply
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -106,14 +163,25 @@ public class MyActController {
|
|
|
|
|
* @return String
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectFileInfo")
|
|
|
|
|
public ResponseEntity<?> selectFileInfo(HttpServletRequest request, ModelMap model, GnrlBbscttVO bbsctt){
|
|
|
|
|
@RequestMapping(value="/selectFileInfo", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<?> selectFileInfo(HttpServletRequest request, ModelMap model, BOGnrlbbscttVO bbsctt){
|
|
|
|
|
bbsctt.setServerDv("sopmal");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
return responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOFileInfo",bbsctt),
|
|
|
|
|
ReplyFromResrc::getReply
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
}
|
|
|
|
|
DataMap content = new DataMap();
|
|
|
|
|
content.put("fileInfo", service.selectFileInfo(bbsctt));
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(
|
|
|
|
|
WnbtResponse.builder()
|
|
|
|
|
.resBody(new WnbtResponseBody(content))
|
|
|
|
|
.build()
|
|
|
|
|
);
|
|
|
|
|
// return responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOFileInfo",bbsctt),
|
|
|
|
|
// ReplyFromResrc::getReply
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -123,22 +191,73 @@ public class MyActController {
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectGoodsQnaDtlUpdtForm")
|
|
|
|
|
public String selectGoodsQnaDtlUpdtForm(HttpServletRequest request, ModelMap model,GnrlBbscttVO bbsctt){
|
|
|
|
|
public String selectGoodsQnaDtlUpdtForm(HttpServletRequest request, ModelMap model,BOGnrlbbscttVO bbsctt, BOMbrVO vo){
|
|
|
|
|
bbsctt.setServerDv("sopmal");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttUpdtPopupForm",bbsctt),
|
|
|
|
|
model,
|
|
|
|
|
"resultMap"
|
|
|
|
|
);
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
if (user.getUserInnb() > 0) {
|
|
|
|
|
if ("mngr".equals(bbsctt.getServerDv())) {
|
|
|
|
|
bbsctt.setRegusrDvCd("02"); //관리자
|
|
|
|
|
} else {
|
|
|
|
|
bbsctt.setRegusrDvCd("01"); //회원
|
|
|
|
|
bbsctt.setAnswMbtlnb(user.getMbtlnb());
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
bbsctt.setRegusrDvCd("99");//비회원
|
|
|
|
|
}
|
|
|
|
|
bbsctt.setSecretKey(boCommonService.selectSecretkey());
|
|
|
|
|
// 게시판 설정 정보
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
// 게시글 상세 조회
|
|
|
|
|
Map<String, Object> bbscttInfo = new HashMap<String, Object>();
|
|
|
|
|
bbscttInfo = service.selectBOBbscttUpdt(bbsctt);
|
|
|
|
|
|
|
|
|
|
// 분류 조회
|
|
|
|
|
List<DataMap> itmList = new ArrayList<>();
|
|
|
|
|
itmList = service.selectBOBbscttItmInqire(bbsctt);
|
|
|
|
|
|
|
|
|
|
//추가 항목 조회, 추가항목 항목 조회
|
|
|
|
|
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
|
|
|
|
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
|
|
|
|
|
|
|
|
|
//리뷰항목 리스트, 리뷰항목 항목 리스트
|
|
|
|
|
Map<String, Object> rvwQesitmList = new HashMap<String, Object>();
|
|
|
|
|
rvwQesitmList = service.selectBOStarItm(bbsctt);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content = new HashMap<String, Object>();
|
|
|
|
|
content.put("bbsInfo", bbsInfo);
|
|
|
|
|
content.put("bbscttVO", bbsctt);
|
|
|
|
|
content.put("bbscttInfo", bbscttInfo);
|
|
|
|
|
content.put("itmList", itmList);
|
|
|
|
|
content.put("qesitmList", qesitmList);
|
|
|
|
|
content.put("rvwQesitmList", rvwQesitmList);
|
|
|
|
|
|
|
|
|
|
model.addAttribute("resultMap", content);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttUpdtPopupForm",bbsctt),
|
|
|
|
|
// model,
|
|
|
|
|
// "resultMap"
|
|
|
|
|
// );
|
|
|
|
|
model.addAttribute("bbsctt", bbsctt);
|
|
|
|
|
|
|
|
|
|
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
|
|
|
|
model,
|
|
|
|
|
"mpageResultMap"
|
|
|
|
|
);
|
|
|
|
|
Map<String, Object> content2 = selectBOMpageInfoInqire(vo);
|
|
|
|
|
model.addAttribute("mpageResultMap", content2);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
|
|
|
|
// model,
|
|
|
|
|
// "mpageResultMap"
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
return Util.getDeviceType(request)+"/mpage/act/MyGoodsQnaDtlUpdtU";
|
|
|
|
|
}
|
|
|
|
|
@@ -150,20 +269,29 @@ public class MyActController {
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectMyRvwInqireForm")
|
|
|
|
|
public String selectMyRvwInqireForm(HttpServletRequest request, ModelMap model,GnrlBbscttVO bbsctt){
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBORvwBnefInfo",bbsctt),
|
|
|
|
|
model,
|
|
|
|
|
"mlgAccmlNtc"
|
|
|
|
|
);
|
|
|
|
|
public String selectMyRvwInqireForm(HttpServletRequest request, ModelMap model,BOGnrlbbscttVO bbsctt, BOMbrVO vo){
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
|
|
|
|
|
/*리뷰 조회 폼*/
|
|
|
|
|
DataMap rvwBnefInfo = new DataMap();
|
|
|
|
|
rvwBnefInfo = service.selectBORvwBnefInfo(bbsctt);
|
|
|
|
|
|
|
|
|
|
model.addAttribute("mlgAccmlNtc", rvwBnefInfo);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBORvwBnefInfo",bbsctt),
|
|
|
|
|
// model,
|
|
|
|
|
// "mlgAccmlNtc"
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
|
|
|
|
model,
|
|
|
|
|
"mpageResultMap"
|
|
|
|
|
);
|
|
|
|
|
Map<String, Object> content2 = selectBOMpageInfoInqire(vo);
|
|
|
|
|
model.addAttribute("mpageResultMap", content2);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
|
|
|
|
// model,
|
|
|
|
|
// "mpageResultMap"
|
|
|
|
|
// );
|
|
|
|
|
model.addAttribute("vo",bbsctt);
|
|
|
|
|
return Util.getDeviceType(request)+"/mpage/act/MyRvwRForm";
|
|
|
|
|
}
|
|
|
|
|
@@ -174,15 +302,17 @@ public class MyActController {
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectWritngPosblRvwInqire")
|
|
|
|
|
public String selectWritngPosblRvwInqire(HttpServletRequest request, ModelMap model,RvwVO rvwVO){
|
|
|
|
|
public String selectWritngPosblRvwInqire(HttpServletRequest request, ModelMap model,BOGnrlbbscttVO rvwVO){
|
|
|
|
|
rvwVO.setRvwBbscttDv("rvw");
|
|
|
|
|
rvwVO.setServerDv("sopmal");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOWritPosblRvw",rvwVO),
|
|
|
|
|
model,
|
|
|
|
|
"resultMap"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content = selectBOWritPosblRvw(rvwVO);
|
|
|
|
|
model.addAttribute("resultMap", content);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOWritPosblRvw",rvwVO),
|
|
|
|
|
// model,
|
|
|
|
|
// "resultMap"
|
|
|
|
|
// );
|
|
|
|
|
return Util.getDeviceType(request)+"/mpage/act/WritngPosblRvwR";
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
@@ -191,15 +321,21 @@ public class MyActController {
|
|
|
|
|
* @return String
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectWritngPosblRvwInqireAjax")
|
|
|
|
|
public ResponseEntity<?> selectWritngPosblRvwInqireAjax(RvwVO rvwVO){
|
|
|
|
|
@RequestMapping(value="/selectWritngPosblRvwInqireAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<?> selectWritngPosblRvwInqireAjax(BOGnrlbbscttVO rvwVO){
|
|
|
|
|
rvwVO.setRvwBbscttDv("rvw");
|
|
|
|
|
rvwVO.setServerDv("sopmal");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
return responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOWritPosblRvw",rvwVO),
|
|
|
|
|
ReplyFromResrc::getReply
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content = selectBOWritPosblRvw(rvwVO);
|
|
|
|
|
return ResponseEntity.ok(
|
|
|
|
|
WnbtResponse.builder()
|
|
|
|
|
.resBody(new WnbtResponseBody(content))
|
|
|
|
|
.build()
|
|
|
|
|
);
|
|
|
|
|
// return responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOWritPosblRvw",rvwVO),
|
|
|
|
|
// ReplyFromResrc::getReply
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -209,16 +345,18 @@ public class MyActController {
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectMyRvwInqire")
|
|
|
|
|
public String selectMyRvwInqire(HttpServletRequest request, ModelMap model,RvwVO rvwVO){
|
|
|
|
|
public String selectMyRvwInqire(HttpServletRequest request, ModelMap model,BOGnrlbbscttVO rvwVO){
|
|
|
|
|
rvwVO.setReqUrl("mpage");
|
|
|
|
|
rvwVO.setServerDv("sopmal");
|
|
|
|
|
rvwVO.setUseAt("Y");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOMyRvwListInqire",rvwVO),
|
|
|
|
|
model,
|
|
|
|
|
"resultMap"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
DataMap content = selectBOMyRvwListInqire(rvwVO);
|
|
|
|
|
model.addAttribute("resultMap", content);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOMyRvwListInqire",rvwVO),
|
|
|
|
|
// model,
|
|
|
|
|
// "resultMap"
|
|
|
|
|
// );
|
|
|
|
|
return Util.getDeviceType(request)+"/mpage/act/MyRvwR";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -228,16 +366,22 @@ public class MyActController {
|
|
|
|
|
* @return String
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value="/selectMyRvwInqireAjax")
|
|
|
|
|
public ResponseEntity<?> selectMyRvwInqireAjax(RvwVO rvwVO){
|
|
|
|
|
@RequestMapping(value="/selectMyRvwInqireAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<?> selectMyRvwInqireAjax(BOGnrlbbscttVO rvwVO){
|
|
|
|
|
rvwVO.setReqUrl("mpage");
|
|
|
|
|
rvwVO.setServerDv("sopmal");
|
|
|
|
|
rvwVO.setUseAt("Y");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
return responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOMyRvwListInqire",rvwVO),
|
|
|
|
|
ReplyFromResrc::getReply
|
|
|
|
|
|
|
|
|
|
DataMap content = selectBOMyRvwListInqire(rvwVO);
|
|
|
|
|
return ResponseEntity.ok(
|
|
|
|
|
WnbtResponse.builder()
|
|
|
|
|
.resBody(new WnbtResponseBody(content))
|
|
|
|
|
.build()
|
|
|
|
|
);
|
|
|
|
|
// return responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOMyRvwListInqire",rvwVO),
|
|
|
|
|
// ReplyFromResrc::getReply
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -247,15 +391,18 @@ public class MyActController {
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value = "/selectRvwWritngPopupForm")
|
|
|
|
|
public String selectRvwWritngPopupForm(HttpServletRequest request, ModelMap model, RvwVO rvwVO){
|
|
|
|
|
public String selectRvwWritngPopupForm(HttpServletRequest request, ModelMap model, BOGnrlbbscttVO rvwVO){
|
|
|
|
|
rvwVO.setRvwBbscttDv("rvw");
|
|
|
|
|
rvwVO.setServerDv("sopmal");
|
|
|
|
|
//리뷰 등록 가능 여부 true시 등록폼 호출
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttRegistPopupForm",rvwVO),
|
|
|
|
|
model,
|
|
|
|
|
"resultMap"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content = selectBOBbscttRegistPopupForm(rvwVO);
|
|
|
|
|
model.addAttribute("resultMap", content);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttRegistPopupForm",rvwVO),
|
|
|
|
|
// model,
|
|
|
|
|
// "resultMap"
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
return Util.getDeviceType(request)+"/mpage/act/RvwWritngPopupC";
|
|
|
|
|
}
|
|
|
|
|
@@ -267,15 +414,120 @@ public class MyActController {
|
|
|
|
|
* @return ResponseEntity
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value = "/deleteRvwBbscttDel", method = RequestMethod.POST)
|
|
|
|
|
public ResponseEntity<WnbtResponse> deleteRvwBbscttDel(@RequestBody GnrlBbscttVO bbsctt) {
|
|
|
|
|
@RequestMapping(value = "/deleteRvwBbscttDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<WnbtResponse> deleteRvwBbscttDel(@RequestBody BOGnrlbbscttVO bbsctt) {
|
|
|
|
|
bbsctt.setServerDv("sopmal");
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
return responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/updateBOBbscttDel",bbsctt),
|
|
|
|
|
ReplyFromResrc::getReply
|
|
|
|
|
// 작성자 정보 추출
|
|
|
|
|
if (user.getUserInnb() > 0) { //회원 , 관리자
|
|
|
|
|
bbsctt.setUpdusr(user.getUserInnb());
|
|
|
|
|
} else { // 비회원
|
|
|
|
|
bbsctt.setUpdusr(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
/*게시글 삭제*/
|
|
|
|
|
DataMap bbscttDelResult = service.updateBOBbscttDel(bbsctt);
|
|
|
|
|
content.put("result", bbscttDelResult);
|
|
|
|
|
/*삭제 성공 시*/
|
|
|
|
|
if ("success".equals(bbscttDelResult.get("result"))) {
|
|
|
|
|
//리뷰 관련 처리
|
|
|
|
|
if ("06".equals(bbsctt.getBbsTyCd()) || "07".equals(bbsctt.getBbsTyCd())) {
|
|
|
|
|
if (!CollectionUtils.isEmpty(bbsctt.getDelInfoArr())) {
|
|
|
|
|
/*해당 정보로 마일리지 금액 조회하기*/
|
|
|
|
|
List<Object> accmlmnyAmtInfoArr = new ArrayList<>();
|
|
|
|
|
BOMlgVO mlgVo = new BOMlgVO();
|
|
|
|
|
for (BODelInfoVO delInfo : bbsctt.getDelInfoArr()) {
|
|
|
|
|
if ("01".equals(delInfo.getRegusrDvCd())) {
|
|
|
|
|
if ("03".equals(user.getSysDvCd())) { //관리자 삭제시 마일리지 회수
|
|
|
|
|
/*공통 파라미터*/
|
|
|
|
|
mlgVo.setMbrInnb(String.valueOf(delInfo.getRegusr()));
|
|
|
|
|
mlgVo.setMbrDvCd(delInfo.getMbrDvCd());
|
|
|
|
|
mlgVo.setSopmalCd(bbsctt.getSopmalCd());
|
|
|
|
|
mlgVo.setBbscttInnb(BigInteger.valueOf(delInfo.getBbscttInnb()));
|
|
|
|
|
mlgVo.setMlgApplcDvCd("06");
|
|
|
|
|
mlgVo.setMlgApplcResn("[회수]리뷰(구매후기) 삭제에 의한 마일리지 차감");
|
|
|
|
|
mlgVo.setRegusrDvCd("02");
|
|
|
|
|
mlgVo.setUpdusrDvCd("02");
|
|
|
|
|
mlgVo.setRegusr(user.getUserInnb());
|
|
|
|
|
mlgVo.setUpdusr(user.getUserInnb());
|
|
|
|
|
|
|
|
|
|
/*마일리지 수동 회수 여부*/
|
|
|
|
|
if ("N".equals(bbsctt.getMlgPassivRtrvlAt())) { // 선택 삭제시
|
|
|
|
|
DataMap accmlmnyAmtInfo = new DataMap();
|
|
|
|
|
accmlmnyAmtInfo = mlgService.selectBOMlgByBbscttInnb(mlgVo);
|
|
|
|
|
if (accmlmnyAmtInfo != null) {
|
|
|
|
|
mlgVo.setMbrInnb(String.valueOf(accmlmnyAmtInfo.get("regusr")));
|
|
|
|
|
mlgVo.setMbrDvCd((String) accmlmnyAmtInfo.get("mbrDvCd"));
|
|
|
|
|
mlgVo.setSopmalCd((String) accmlmnyAmtInfo.get("sopmalCd"));
|
|
|
|
|
mlgVo.setBbscttInnb((BigInteger) accmlmnyAmtInfo.get("bbscttInnb"));
|
|
|
|
|
mlgVo.setAccmlmnyAmt((BigDecimal) accmlmnyAmtInfo.get("accmlmnyAmt"));
|
|
|
|
|
mlgService.insertBOMngrMlgDn(mlgVo);
|
|
|
|
|
}
|
|
|
|
|
} else { //단독 삭제시*/
|
|
|
|
|
if (delInfo.getRtrvlMlgAmt() != null) {
|
|
|
|
|
if (delInfo.getRtrvlMlgAmt().compareTo(BigDecimal.valueOf(0)) > 0) {
|
|
|
|
|
mlgVo.setAccmlmnyAmt(delInfo.getRtrvlMlgAmt());
|
|
|
|
|
mlgService.insertBOMngrMlgDn(mlgVo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//회원 관련
|
|
|
|
|
if (delInfo.getRegusr() != null) {
|
|
|
|
|
BOGnrlbbscttVO mbrSite = new BOGnrlbbscttVO();
|
|
|
|
|
mbrSite.setSopmalCd(bbsctt.getSopmalCd());
|
|
|
|
|
if ("sopmal".equals(bbsctt.getServerDv())) {
|
|
|
|
|
mbrSite.setRegusr(user.getUserInnb());
|
|
|
|
|
mbrSite.setMbrDvCd(user.getMbrDvCd());
|
|
|
|
|
} else {
|
|
|
|
|
mbrSite.setRegusr(delInfo.getRegusr());
|
|
|
|
|
mbrSite.setMbrDvCd(delInfo.getMbrDvCd());
|
|
|
|
|
}
|
|
|
|
|
service.updateBORvwWritngCnt(mbrSite);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//상품관련 집계와 회원관련 집계는 관리자혹은 사용자가 모두 삭제 시 처리가 되어야해
|
|
|
|
|
//상품 관련
|
|
|
|
|
if (delInfo.getGoodsInnb() != null) {
|
|
|
|
|
BOGoodsVO goodsVO = new BOGoodsVO();
|
|
|
|
|
goodsVO.setGoodsInnb(String.valueOf(delInfo.getGoodsInnb()));
|
|
|
|
|
goodsVO.setSopmalCd(bbsctt.getSopmalCd());
|
|
|
|
|
/*상품정보 > 상품후기건수 차감*/
|
|
|
|
|
goodsService.updateRvwRelateSm(goodsVO);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ("05".equals(bbsctt.getBbsTyCd())) {//상품qna는 상품문의 집계만
|
|
|
|
|
//상품 관련
|
|
|
|
|
if (!CollectionUtils.isEmpty(bbsctt.getGoodsInnbArr())) {
|
|
|
|
|
for (String goodsInnb : bbsctt.getGoodsInnbArr()) {
|
|
|
|
|
BOGoodsVO goodsVO = new BOGoodsVO();
|
|
|
|
|
goodsVO.setGoodsInnb(goodsInnb);
|
|
|
|
|
goodsVO.setSopmalCd(bbsctt.getSopmalCd());
|
|
|
|
|
|
|
|
|
|
/*상품정보 > 상품후기건수 차감*/
|
|
|
|
|
goodsService.updateGoodsInqryCnt(goodsVO);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(
|
|
|
|
|
WnbtResponse.builder()
|
|
|
|
|
.resBody(new WnbtResponseBody(content))
|
|
|
|
|
.build()
|
|
|
|
|
);
|
|
|
|
|
// return responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/updateBOBbscttDel",bbsctt),
|
|
|
|
|
// ReplyFromResrc::getReply
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -286,14 +538,263 @@ public class MyActController {
|
|
|
|
|
*/
|
|
|
|
|
@Policy(AuthPolicy.PUBLIC)
|
|
|
|
|
@RequestMapping(value = "/selectRvwEasyRegistForm", method = RequestMethod.POST)
|
|
|
|
|
public String selectRvwEasyRegistForm(@RequestBody RvwVO vo, ModelMap model, HttpServletRequest request) {
|
|
|
|
|
public String selectRvwEasyRegistForm(@RequestBody BOGnrlbbscttVO vo, ModelMap model, HttpServletRequest request) {
|
|
|
|
|
vo.setRvwBbscttDv("rvw");
|
|
|
|
|
//BO에서 API 호출
|
|
|
|
|
responseHandler.handleResponse(
|
|
|
|
|
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttRegistPopupForm", vo),
|
|
|
|
|
model,
|
|
|
|
|
"resultMap"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content = selectBOBbscttRegistPopupForm(vo);
|
|
|
|
|
model.addAttribute("resultMap", content);
|
|
|
|
|
// responseHandler.handleResponse(
|
|
|
|
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttRegistPopupForm", vo),
|
|
|
|
|
// model,
|
|
|
|
|
// "resultMap"
|
|
|
|
|
// );
|
|
|
|
|
return Util.getDeviceType(request)+"/mpage/act/RvwEasyRegistC";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* bo로직 게시글 목록 조회
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public DataMap selectBOBbscttListInqire(BOGnrlbbscttVO bbsctt) {
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {//사용자 조회 일 경우
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!"crm".equals(bbsctt.getReqUrl())) {
|
|
|
|
|
if (user.getUserInnb() > 0) {
|
|
|
|
|
bbsctt.setRegusr(user.getUserInnb());
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
|
content.put("bbsInfo", bbsInfo);
|
|
|
|
|
content.put("bbsctt", bbsctt);
|
|
|
|
|
content.put("resultList", resultList);
|
|
|
|
|
content.put("paginationInfo", bbsctt.getPaginationInfo());
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* bo로직 사이트 메인페이지 등급, 마일리지, 쿠폰, 위시리스트, 배송중 정보 조회
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public Map<String, Object> selectBOMpageInfoInqire(BOMbrVO vo) {
|
|
|
|
|
// 사용자 정보 추출 및 적용
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
vo.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
vo.setMbrInnb(String.valueOf(user.getUserInnb()));
|
|
|
|
|
vo.setMbrDvCd(user.getMbrDvCd());
|
|
|
|
|
|
|
|
|
|
// 상품 옵션 조회
|
|
|
|
|
Map<String, Object> message = new HashMap<>();
|
|
|
|
|
message = boMbrService.selectBOMpageInfoInqire(vo);
|
|
|
|
|
|
|
|
|
|
BOSiteVO siteVO = new BOSiteVO();
|
|
|
|
|
siteVO.setSopmalCd(vo.getSopmalCd());
|
|
|
|
|
siteVO.setCookieValArr(vo.getCookieValArr());
|
|
|
|
|
|
|
|
|
|
List<DataMap> recentGoods = null;
|
|
|
|
|
if (vo.getCookieValArr() != null) {
|
|
|
|
|
recentGoods = boSiteService.selectBOMainRecentGoods(siteVO);
|
|
|
|
|
message.put("recentGoods", recentGoods);
|
|
|
|
|
}
|
|
|
|
|
return message;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* bo로직 작성 가능한 리뷰
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public Map<String, Object> selectBOWritPosblRvw(BOGnrlbbscttVO bbsctt) {
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
bbsctt.setRegusr(user.getUserInnb());
|
|
|
|
|
bbsctt.setMbrDvCd(user.getMbrDvCd());
|
|
|
|
|
// 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());
|
|
|
|
|
|
|
|
|
|
List<DataMap> resultList = new ArrayList<>();
|
|
|
|
|
resultList = service.selectBOWritPosblRvw(bbsctt);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
|
|
content.put("bbscttVO", bbsctt);
|
|
|
|
|
content.put("resultList", resultList);
|
|
|
|
|
content.put("paginationInfo", bbsctt.getPaginationInfo());
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* bo로직 마이페이지 > 나의 활동 > 나의리뷰 조회
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public DataMap selectBOMyRvwListInqire(BOGnrlbbscttVO bbsctt) {
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
}
|
|
|
|
|
if (!"crm".equals(bbsctt.getReqUrl())) {
|
|
|
|
|
bbsctt.setRegusr(user.getUserInnb());
|
|
|
|
|
}
|
|
|
|
|
// 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.selectBOMyRvwListInqire(bbsctt);
|
|
|
|
|
|
|
|
|
|
DataMap content = new DataMap();
|
|
|
|
|
content.put("bbscttVO", bbsctt);
|
|
|
|
|
content.put("resultList", resultList);
|
|
|
|
|
content.put("paginationInfo", bbsctt.getPaginationInfo());
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 게시글 등록 팝업
|
|
|
|
|
*/
|
|
|
|
|
public Map<String, Object> selectBOBbscttRegistPopupForm(BOGnrlbbscttVO bbsctt) {
|
|
|
|
|
Map<String, Object> content = new HashMap<String, Object>();
|
|
|
|
|
// 작성자 정보 추출
|
|
|
|
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
|
|
|
|
|
|
|
|
|
if ("01".equals(user.getSysDvCd())) {
|
|
|
|
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
BOGnrlbbscttVO regusrInfo = new BOGnrlbbscttVO();
|
|
|
|
|
DataMap mbrInfo = new DataMap();
|
|
|
|
|
if (user.getUserInnb() > 0) {
|
|
|
|
|
bbsctt.setRegusr(user.getUserInnb());
|
|
|
|
|
if (!"01".equals(user.getSysDvCd())) {
|
|
|
|
|
bbsctt.setRegusrDvCd("02"); //관리자
|
|
|
|
|
} else {
|
|
|
|
|
bbsctt.setRegusrDvCd("01"); //회원
|
|
|
|
|
bbsctt.setMbrDvCd(user.getMbrDvCd());
|
|
|
|
|
DataMap mbr = new DataMap();
|
|
|
|
|
mbr.put("mbrInnb", String.valueOf(bbsctt.getRegusr()));
|
|
|
|
|
mbr.put("mbrDvCd", bbsctt.getMbrDvCd());
|
|
|
|
|
mbr.put("secretKey", boCommonService.selectSecretkey());
|
|
|
|
|
mbr.put("sopmalCd", bbsctt.getSopmalCd());
|
|
|
|
|
mbrInfo = boMbrService.selectSimpleMbrInfo(mbr);
|
|
|
|
|
regusrInfo.setAnswMbtlnb((String) mbrInfo.get("mbtlnb"));
|
|
|
|
|
}
|
|
|
|
|
regusrInfo.setRegusrNm(user.getMbrNm());
|
|
|
|
|
regusrInfo.setRegusrId(user.getMbrId());
|
|
|
|
|
regusrInfo.setRegusr(user.getUserInnb());
|
|
|
|
|
regusrInfo.setRegusrDvCd(bbsctt.getRegusrDvCd());
|
|
|
|
|
} else {
|
|
|
|
|
regusrInfo.setRegusr(0);
|
|
|
|
|
regusrInfo.setRegusrDvCd("99");//비회원
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 게시판 설정 정보
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
// 분류
|
|
|
|
|
List<DataMap> itmList = new ArrayList<>();
|
|
|
|
|
itmList = service.selectBOBbscttItmInqire(bbsctt);
|
|
|
|
|
|
|
|
|
|
//리뷰항목 리스트, 리뷰항목 항목 리스트
|
|
|
|
|
Map<String, Object> rvwQesitmList = new HashMap<String, Object>();
|
|
|
|
|
rvwQesitmList = service.selectBOStarItm(bbsctt);
|
|
|
|
|
|
|
|
|
|
//추가항목 리스트, 추가항목 항목 리스트
|
|
|
|
|
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
|
|
|
|
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
|
|
|
|
|
|
|
|
|
//사용자 > 리뷰 상품 조회
|
|
|
|
|
DataMap rvwGoodsInfo = new DataMap();
|
|
|
|
|
DataMap mlgInfo = new DataMap();
|
|
|
|
|
if ("sopmal".equals(bbsctt.getServerDv())) {
|
|
|
|
|
if ("rvw".equals(bbsctt.getRvwBbscttDv())) {
|
|
|
|
|
rvwGoodsInfo = service.selectBORvwGoods(bbsctt);
|
|
|
|
|
content.put("rvwGoodsInfo", rvwGoodsInfo);
|
|
|
|
|
mlgInfo = service.selectBORvwBnefInfo(bbsctt);
|
|
|
|
|
content.put("mlgInfo", mlgInfo);
|
|
|
|
|
|
|
|
|
|
List<DataMap> rvwItmList = new ArrayList<>();
|
|
|
|
|
List<DataMap> starItmList = new ArrayList<>();
|
|
|
|
|
//사용자 별표 평점 역으로 리스트 set(퍼블리싱으로 인한 역처리)
|
|
|
|
|
if (rvwQesitmList.get("starItmCnList") != null) {
|
|
|
|
|
rvwItmList = (List<DataMap>) rvwQesitmList.get("starItmCnList");
|
|
|
|
|
for (int i = rvwItmList.size() - 1; i >= 0; i--) {
|
|
|
|
|
starItmList.add(rvwItmList.get(i));
|
|
|
|
|
}
|
|
|
|
|
content.put("starItmList", starItmList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//사용자 > 상품q&a 상품 조회
|
|
|
|
|
DataMap qnaGoodsInfo = new DataMap();
|
|
|
|
|
if ("sopmal".equals(bbsctt.getServerDv())) {
|
|
|
|
|
if ("modal".equals(bbsctt.getReqUrl())) {
|
|
|
|
|
qnaGoodsInfo = service.selectTargetGoodsInfo(bbsctt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
content.put("qnaGoodsInfo", qnaGoodsInfo);
|
|
|
|
|
content.put("regusrInfo", regusrInfo);
|
|
|
|
|
content.put("bbscttVO", bbsctt);
|
|
|
|
|
content.put("itmList", itmList);
|
|
|
|
|
content.put("bbsInfo", bbsInfo);
|
|
|
|
|
content.put("qesitmList", qesitmList);
|
|
|
|
|
content.put("rvwQesitmList", rvwQesitmList);
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|