초기소스
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbs.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/itrnt/bbs/bbs")
|
||||
public class BOItrntBbsController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbs.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbs.vo.BOItrntBbsVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntBbscttVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntSvVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntBbsMapper {
|
||||
/*****************************************
|
||||
게시판 설정 조회
|
||||
********************************************/
|
||||
public DataMap selectBOBbsSetupInfo(BOItrntBbsVO vo);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbs.service;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbs.mapper.BOItrntBbsMapper;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbs.vo.BOItrntBbsVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BOItrntBbsService {
|
||||
@Autowired
|
||||
private BOItrntBbsMapper mapper;
|
||||
/**
|
||||
* 게시판 설정 정보
|
||||
*
|
||||
*/
|
||||
public DataMap selectBOBbsSetupInfo(BOItrntBbsVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
DataMap dataMap = new DataMap();
|
||||
dataMap = mapper.selectBOBbsSetupInfo(vo);
|
||||
return dataMap;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbs.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntBbsVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**게시판ID*/
|
||||
private String bbsId;
|
||||
/**쇼핑몰코드*/
|
||||
private String sopmalCd = "CH";
|
||||
/**게시글고유번호*/
|
||||
private String bbscttInnb;
|
||||
/**게시판명*/
|
||||
private String bbsNm;
|
||||
/**기본내용사용여부*/
|
||||
private String dftCnUseAt;
|
||||
/**기본내용*/
|
||||
private String dftCn;
|
||||
/**파일첨부허용파일확장자*/
|
||||
private String filPermFilExtsn;
|
||||
/**개별, 통합*/
|
||||
private String slangFlterUseAt;
|
||||
/**게시판노출여부*/
|
||||
private String bbsExpsrAt;
|
||||
/**신규게시물기준일수*/
|
||||
private String newNttStdrDeCnt;
|
||||
/**인기게시물기준조회건수*/
|
||||
private String popularNttStdrInqireCnt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,511 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbsctt.controller;
|
||||
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbs.service.BOItrntBbsService;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbs.vo.BOItrntBbsVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.service.BOItrntBbscttService;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntBbscttVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntSvVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.cm.service.BOItrntCmService;
|
||||
import com.wb.domainserver.response.ApiResponse;
|
||||
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.SendToResrc;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/itrnt/bbs/bbsctt")
|
||||
public class BOItrntBbscttController {
|
||||
@Autowired
|
||||
private BOItrntBbscttService service;
|
||||
@Autowired
|
||||
private BOItrntCmService cmService;
|
||||
@Autowired
|
||||
private BOItrntBbsService bbsService;
|
||||
@Autowired
|
||||
private BOMssageService boMssageService;
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
@Autowired
|
||||
private BOMssageService mssageService;
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
/************************************************************************************
|
||||
* 목록 조회 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 목록 조회 폼
|
||||
*
|
||||
* @param bbsctt 게시글 파라미터VO
|
||||
* @return ResponseEntity<?> 목록조회 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOBbscttListInqireForm")
|
||||
public ResponseEntity<?> selectBOBbscttListInqireForm(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
Map<String, Object> content = new HashMap<String, Object>();
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
//매장 관리자 구분
|
||||
bbsctt.setTentGroup(user.getTentGroup());
|
||||
//매장 구분
|
||||
bbsctt.setStrDv(user.getStrOperDv());
|
||||
|
||||
// 게시판 설정 정보 조회
|
||||
BOItrntBbsVO bbsVO = new BOItrntBbsVO();
|
||||
bbsVO.setSopmalCd("CH");
|
||||
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||
DataMap bbsInfo = new DataMap();
|
||||
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
||||
|
||||
// 게시판 리스트
|
||||
List<DataMap> bbsList = service.selectBOBbscttListInqireForm(bbsctt);
|
||||
|
||||
//입력항목 조회
|
||||
Map<String,Object> itmInfo = new HashMap<>();
|
||||
itmInfo = service.selectBOBbscttRegistPopupForm(bbsctt);
|
||||
|
||||
//물류관련요청 게시판일시
|
||||
/** 슈퍼관리자 구분 공통코드*/
|
||||
if ("logistics_req".equals(bbsctt.getBbsId())) {
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("WRITE_DV");
|
||||
List<?> writeDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("writeDv", writeDv);
|
||||
}
|
||||
|
||||
/*매장구분*/
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("STR_DV");
|
||||
List<?> strDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
content.put("bbsInfo", bbsInfo);
|
||||
content.put("bbsctt", bbsctt);
|
||||
content.put("bbsList", bbsList);
|
||||
content.put("itmInfo", itmInfo);
|
||||
content.put("strDv", strDv);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 목록 조회
|
||||
*
|
||||
* @param bbsctt 게시글 파라미터VO
|
||||
* @return ResponseEntity<?> 목록조회 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOBbscttListInqire")
|
||||
public ResponseEntity<?> selectBOBbscttListInqire(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("02".equals(user.getTentGroup())){
|
||||
bbsctt.setExpsrAt("Y");
|
||||
if(!"gs_seller_notice".equals(bbsctt.getBbsId())){ //공지사항 제외한 게시판은 본인꺼만
|
||||
bbsctt.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
}
|
||||
}
|
||||
//목록에서 화면제어시 사용
|
||||
bbsctt.setRegusr(user.getUserInnb());
|
||||
bbsctt.setTentGroup(user.getTentGroup());
|
||||
|
||||
// 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);
|
||||
|
||||
// 게시판 설정 정보 조회
|
||||
BOItrntBbsVO bbsVO = new BOItrntBbsVO();
|
||||
|
||||
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||
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 ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
/************************************************************************************
|
||||
* 상세 조회 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 상세 조회
|
||||
*
|
||||
* @param vo 게시글 파라미터VO
|
||||
* @return ResponseEntity<?> 상세 조회 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOBbscttDtlInqirePopup")
|
||||
public ResponseEntity<?> selectBOBbscttDtlInqirePopup(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//작성자 정보 추출
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
bbsctt.setStrInnb(StringUtil.isNullToString(user.getUserInnb()));
|
||||
bbsctt.setRegusrId(StringUtil.isNullToString(user.getMbrId()));
|
||||
if("01".equals(user.getTentGroup())){
|
||||
bbsctt.setRegusrNm("관리자");
|
||||
}else{
|
||||
bbsctt.setRegusrNm(user.getTentcpnNm());
|
||||
bbsctt.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
}
|
||||
bbsctt.setTentGroup(user.getTentGroup());//매장일때
|
||||
// 게시판 설정 정보 조회
|
||||
BOItrntBbsVO bbsVO = new BOItrntBbsVO();
|
||||
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||
DataMap bbsInfo = new DataMap();
|
||||
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
||||
|
||||
// 게시글 상세 조회
|
||||
Map<String, Object> bbscttInfo = new HashMap<String, Object>();
|
||||
bbsctt.setSecretKey(boCommonService.selectSecretkey());
|
||||
bbscttInfo = service.selectBOBbscttDtlInqirePopup(bbsctt);
|
||||
|
||||
//답변 조회
|
||||
DataMap answ = new DataMap();
|
||||
answ = service.selectBOAnswInfoInqire(bbsctt);
|
||||
content.put("answ", answ);
|
||||
|
||||
// 조회수 증가
|
||||
service.updateBOBbscttRdcntUpdt(bbsctt);
|
||||
|
||||
content.put("bbscttInfo", bbscttInfo);
|
||||
content.put("bbsInfo", bbsInfo);
|
||||
content.put("bbsctt", bbsctt);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* 등록 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 등록 팝업
|
||||
*
|
||||
* @param bbsctt 게시글 파라미터VO
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOBbscttRegistPopupForm")
|
||||
public ResponseEntity<?> selectBOBbscttRegistPopupForm(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
Map<String, Object> content = new HashMap<String, Object>();
|
||||
// 작성자 정보 추출
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("02".equals(user.getTentGroup())){
|
||||
bbsctt.setRegusrNm(user.getTentcpnNm());
|
||||
}else{
|
||||
bbsctt.setRegusrNm("관리자");
|
||||
}
|
||||
bbsctt.setTentGroup(user.getTentGroup());//매장일때
|
||||
//매장 정보 조회
|
||||
BOItrntBbscttVO regusrInfo = new BOItrntBbscttVO();
|
||||
regusrInfo.setRegusrNm(user.getTentcpnNm());
|
||||
|
||||
// 게시판 설정 정보
|
||||
BOItrntBbsVO bbsVO = new BOItrntBbsVO();
|
||||
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||
DataMap bbsInfo = new DataMap();
|
||||
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
||||
|
||||
//추가항목 리스트, 추가항목 항목 리스트
|
||||
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
||||
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
||||
|
||||
//물류관련요청 게시판일시
|
||||
/** 슈퍼관리자 구분 코드*/
|
||||
if("logistics_req".equals(bbsctt.getBbsId())){
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("WRITE_DV");
|
||||
List<?> writeDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("writeDv", writeDv);
|
||||
}
|
||||
content.put("regusrInfo", regusrInfo);
|
||||
content.put("bbscttVO", bbsctt);
|
||||
content.put("bbsInfo", bbsInfo);
|
||||
content.put("qesitmList", qesitmList);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 등록
|
||||
*
|
||||
* @param bbsctt 게시글 파라미터VO
|
||||
* @return ResponseEntity<?> 등록 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBOBbscttRegist")
|
||||
public ResponseEntity<?> insertBOBbscttRegist(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
bbsctt.setUpdusr(user.getUserInnb());
|
||||
bbsctt.setRegusr(user.getUserInnb());
|
||||
bbsctt.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
bbsctt.setRegusrId(user.getMbrId());
|
||||
if("02".equals(user.getTentGroup())){
|
||||
bbsctt.setRegusrNm(user.getTentcpnNm());
|
||||
bbsctt.setStrDv(user.getStrOperDv());
|
||||
bbsctt.setRegusrDvCd("04");
|
||||
}else{
|
||||
bbsctt.setRegusrNm("관리자");
|
||||
bbsctt.setRegusrDvCd("02");
|
||||
}
|
||||
|
||||
DataMap mbrInfo = new DataMap();
|
||||
|
||||
/*게시글 등록*/
|
||||
bbsctt.setSecretKey(boCommonService.selectSecretkey());
|
||||
DataMap result = service.insertBOBbscttRegist(bbsctt);
|
||||
|
||||
//TODO:: 물류관련게시판 등록시 SV에게 SMS 알림 로직 추가 2024.11.12
|
||||
//게시글 등록이 성공이되고, 문의유형과 담당자 선택을 하면 해당 담당자 sms 정보 get
|
||||
if ("success".equals(result.get("result")) && !StringUtil.isEmpty(bbsctt.getWriteDvCd()) && !StringUtil.isEmpty(bbsctt.getSvInnb())) {
|
||||
//메세지 발송 대상 조회
|
||||
List<DataMap> svMssageList = service.selectBOItrntSvMssageSndng(bbsctt);
|
||||
|
||||
//메세지 발송
|
||||
mssageService.insertBOAtmcsndng(svMssageList);
|
||||
}
|
||||
return ApiResponse.of(result).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* 수정 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 수정 팝업
|
||||
*
|
||||
* @param bbsctt 게시글 파라미터VO
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOBbscttUpdtPopupForm")
|
||||
public ResponseEntity<?> selectBOBbscttUpdtPopupForm(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
bbsctt.setSecretKey(boCommonService.selectSecretkey());
|
||||
|
||||
if("02".equals(user.getTentGroup())) {
|
||||
bbsctt.setStrInnb(StringUtil.isNullToString(user.getUserInnb()));
|
||||
}
|
||||
//TODO:: 매장본사 구분 가져오기
|
||||
bbsctt.setTentGroup(user.getTentGroup());//매장일때
|
||||
// 게시판 설정 정보
|
||||
BOItrntBbsVO bbsVO = new BOItrntBbsVO();
|
||||
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||
DataMap bbsInfo = new DataMap();
|
||||
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
||||
|
||||
// 게시글 상세 조회
|
||||
Map<String, Object> bbscttInfo = new HashMap<String, Object>();
|
||||
bbscttInfo = service.selectBOBbscttUpdt(bbsctt);
|
||||
|
||||
//추가 항목 조회, 추가항목 항목 조회
|
||||
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
||||
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
||||
|
||||
Map<String, Object> content = new HashMap<String, Object>();
|
||||
//물류관련요청 게시판일시
|
||||
/** 슈퍼관리자 구분 코드*/
|
||||
if ("logistics_req".equals(bbsctt.getBbsId())) {
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("WRITE_DV");
|
||||
List<?> writeDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("writeDv", writeDv);
|
||||
}
|
||||
content.put("bbsInfo", bbsInfo);
|
||||
content.put("bbscttVO", bbsctt);
|
||||
content.put("bbscttInfo", bbscttInfo);
|
||||
content.put("qesitmList", qesitmList);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 수정
|
||||
*
|
||||
* @param vo 게시글 파라미터VO
|
||||
* @return ResponseEntity<?> 수정 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOBbscttUpdt")
|
||||
public ResponseEntity<?> updateBOBbscttUpdt(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
bbsctt.setUpdusr(user.getUserInnb());
|
||||
bbsctt.setTentGroup(user.getTentGroup());//매장일때
|
||||
DataMap content = new DataMap();
|
||||
bbsctt.setSecretKey(boCommonService.selectSecretkey());
|
||||
content = service.updateBOBbscttUpdt(bbsctt);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
/************************************************************************************
|
||||
* 게시글 삭제
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 논리 삭제
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return ResponseEntity<?> 삭제(수정) 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOBbscttDel")
|
||||
public ResponseEntity<?> updateBOBbscttDel(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
bbsctt.setUpdusr(user.getUserInnb());
|
||||
/*게시글 삭제*/
|
||||
DataMap bbscttDelResult = service.updateBOBbscttDel(bbsctt);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* 게시글 세부 기능
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 노출여부 수정
|
||||
*
|
||||
* @param bbsctt
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOBbscttExpsrAt")
|
||||
public ResponseEntity<?> updateBOBbscttExpsrAt(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
bbsctt.setUpdusr(user.getUserInnb());
|
||||
Map<String, Object> message = new HashMap<String, Object>();
|
||||
message = service.updateBOBbscttExpsrAt(bbsctt);
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
/**
|
||||
* 처리상태 수정
|
||||
*
|
||||
* @param bbsctt
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOBbscttComptAt")
|
||||
public ResponseEntity<?> updateBOBbscttComptAt(@RequestBody BOItrntBbscttVO bbsctt) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
bbsctt.setUpdusr(user.getUserInnb());
|
||||
Map<String, Object> message = new HashMap<String, Object>();
|
||||
message = service.updateBOBbscttComptAt(bbsctt);
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
/************************************************************************************
|
||||
* 슈퍼바이저
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 슈퍼바이저 조회
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOIntranetSv")
|
||||
public ResponseEntity<?> selectBOIntranetSv(@RequestBody BOItrntSvVO vo) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
//TODO:: 매장본사 구분 가져오기
|
||||
vo.setTentGroup(user.getTentGroup());//매장일때
|
||||
Map<String, Object> content = new HashMap<String, Object>();
|
||||
//슈퍼관리자 조회
|
||||
List<DataMap> svList = new ArrayList<>();
|
||||
vo.setSecretKey(boCommonService.selectSecretkey());
|
||||
svList = service.selectBOIntranetSv(vo);
|
||||
|
||||
//슈퍼관리자 담당 카테고리 공통코드
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SV_WRITE_DV");
|
||||
List<?> writeDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
content.put("writeDv", writeDv);
|
||||
content.put("svList",svList);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 슈퍼바이저 등록
|
||||
*
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBOIntranetSv")
|
||||
public ResponseEntity<?> insertBOIntranetSv(@RequestBody BOItrntSvVO vo) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setSecretKey(boCommonService.selectSecretkey());
|
||||
Map<String, Object> message = new HashMap<String, Object>();
|
||||
message = service.insertBOIntranetSv(vo);
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 슈퍼바이저 삭제
|
||||
*
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/deleteBOIntranetSv")
|
||||
public ResponseEntity<?> deleteBOIntranetSv(@RequestBody BOItrntSvVO vo) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
Map<String, Object> message = new HashMap<String, Object>();
|
||||
message = service.deleteBOIntranetSv(vo);
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 메인화면 팝업 내용 조회
|
||||
*
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBbscttPopupContent")
|
||||
public ResponseEntity<?> selectBbscttPopupContent() {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
Map<String,Object> content = new HashMap<>();
|
||||
List<DataMap> contentList = new ArrayList<>();
|
||||
contentList = service.selectBbscttPopupContent();
|
||||
content.put("popup",contentList);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbsctt.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntBbscttVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntSvVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntBbscttMapper {
|
||||
/********************************************************
|
||||
* 인트라넷 게시판 리스트 조회
|
||||
********************************************************/
|
||||
/*인트라넷 게시판 리스트 조회*/
|
||||
public List<DataMap> selectBOBbsList(BOItrntBbscttVO vo);
|
||||
/*인트라넷 게시글 대시보드 조회*/
|
||||
public List<DataMap> selectBODashboardBbscttList(BOItrntBbscttVO vo);
|
||||
/*인트라넷 게시글 대시보드 건수*/
|
||||
public List<DataMap> selectBODashboardBbscttCnt(BOItrntBbscttVO vo);
|
||||
|
||||
/********************************************************
|
||||
* 목록 조회
|
||||
********************************************************/
|
||||
/*게시글 건수 조회*/
|
||||
public BOItrntBbscttVO selectBOBbscttListCnt(BOItrntBbscttVO vo);
|
||||
/*게시글 목록 조회*/
|
||||
public List<DataMap> selectBOBbscttListInqire(BOItrntBbscttVO vo);
|
||||
|
||||
/*********************************************************
|
||||
* 게시글 상세 조회
|
||||
**********************************************************/
|
||||
/** 게시글 상세조회 */
|
||||
public DataMap selectBOBbscttDtlInqirePopup(BOItrntBbscttVO vo);
|
||||
/** 게시글 답변상세조회 */
|
||||
public DataMap selectBOAnswInfoInqire(BOItrntBbscttVO vo);
|
||||
|
||||
/*********************************************************
|
||||
게시글 등록, 수정, 논리 삭제
|
||||
************************************************************>
|
||||
/** 게시글 등록 */
|
||||
public int insertBOBbscttRegist(BOItrntBbscttVO vo);
|
||||
|
||||
/** 게시글 수정 */
|
||||
public int updateBOBbscttUpdt(BOItrntBbscttVO vo);
|
||||
|
||||
/** 게시글 논리 삭제 */
|
||||
public Integer updateBOBbscttDel(BOItrntBbscttVO vo);
|
||||
|
||||
/****************************************
|
||||
게시글 기능
|
||||
********************************************/
|
||||
/** 조회수 증가 */
|
||||
public Integer updateBOBbscttRdcntUpdt(BOItrntBbscttVO vo);
|
||||
|
||||
/** 게시글 노출여부 수정 */
|
||||
public int updateBOBbscttExpsrAt(BOItrntBbscttVO vo);
|
||||
|
||||
/** 게시글 처리완료처리 */
|
||||
public int updateBOBbscttComptAt(BOItrntBbscttVO vo);
|
||||
|
||||
/****************************************
|
||||
문항 관련
|
||||
********************************************/
|
||||
/** 게시글추가문항답변 등록 */
|
||||
public Integer insertBOBbscttQesitmAnsw(DataMap map);
|
||||
|
||||
/** 게시판추가문항 조회 */
|
||||
public List<DataMap> selectBOBbscttQesitmInqire(BOItrntBbscttVO vo);
|
||||
|
||||
/** 게시판추가문항항목 조회 */
|
||||
public List<DataMap> selectItmCn(DataMap map);
|
||||
|
||||
/** 게시글추가문항답변 조회 */
|
||||
public List<DataMap> selectBOBbscttQesitmAnswInqire(BOItrntBbscttVO vo);
|
||||
|
||||
/** 게시글추가문항답변 조회 */
|
||||
public List<DataMap> selectBOBbscttListQesitmAnswInqire(List<DataMap> list);
|
||||
|
||||
/** 게시글추가문항답변 삭제 */
|
||||
public Integer deleteBOAditQesitmPhysiclDel(BOItrntBbscttVO vo);
|
||||
|
||||
/** 게시글추가문항답변 삭제 */
|
||||
public Integer deleteBOAditQesitmLogicDel(BOItrntBbscttVO vo);
|
||||
|
||||
/*****************************************
|
||||
게시글 첨부 파일
|
||||
********************************************/
|
||||
/** 파일 등록 */
|
||||
public int insertBOBbscttFileUpload(BOItrntBbscttVO vo);
|
||||
|
||||
/** 파일 조회 */
|
||||
public List<DataMap> selectBOFileInfo(BOItrntBbscttVO vo);
|
||||
|
||||
/*****************************************
|
||||
매장 읽기 시 로그 (GC_INTRANET_BOARDREAD) 등록
|
||||
********************************************/
|
||||
/*조회한 매장이아니면 insert*/
|
||||
public int insertReadProvider(BOItrntBbscttVO vo);
|
||||
/*조회한 매장이아니면 insert*/
|
||||
public int selectReadProvider(BOItrntBbscttVO vo);
|
||||
|
||||
/*****************************************
|
||||
슈퍼바이저 (GC_INTRANET_SV) CRUD
|
||||
********************************************/
|
||||
//슈퍼바이저 조회
|
||||
public List<DataMap> selectBOIntranetSv(BOItrntSvVO vo);
|
||||
//슈퍼바이저 등록
|
||||
public int insertBOIntranetSv(BOItrntSvVO vo);
|
||||
//슈퍼바이저 삭제
|
||||
public int deleteBOIntranetSv(BOItrntSvVO vo);
|
||||
public List<DataMap> selectBOItrntSvMssageSndng(BOItrntBbscttVO vo);
|
||||
/*****************************************
|
||||
메인화면 팝업 조회
|
||||
********************************************/
|
||||
List<DataMap> selectBbscttPopupContent();
|
||||
}
|
||||
@@ -0,0 +1,637 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbsctt.service;
|
||||
|
||||
import com.nimbusds.jose.shaded.gson.Gson;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.mapper.BOItrntBbscttMapper;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntBbscttVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo.BOItrntSvVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BOItrntBbscttService {
|
||||
@Autowired
|
||||
private BOItrntBbscttMapper mapper;
|
||||
|
||||
/************************************************************************************
|
||||
* 대시보드 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 대시보드
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 전체 목록
|
||||
*/
|
||||
public Map<String, Object> selectBODashboardBbscttList(BOItrntBbscttVO vo) {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
//대시보드 건수 조회
|
||||
List<DataMap> cnt = mapper.selectBODashboardBbscttCnt(vo);
|
||||
List<List<DataMap>> listByBbs = new ArrayList<>();
|
||||
//대시보드 조회
|
||||
if(!CollectionUtils.isEmpty(cnt)){
|
||||
for(DataMap bbs : cnt){
|
||||
List<DataMap> list = new ArrayList<>();
|
||||
vo.setBbsId((String) bbs.get("bbsId"));
|
||||
list = mapper.selectBODashboardBbscttList(vo);
|
||||
listByBbs.add(list);
|
||||
}
|
||||
}
|
||||
//게시판 종류 및 건수
|
||||
List<DataMap> bbsList = new ArrayList<>();
|
||||
bbsList = mapper.selectBOBbsList(vo);
|
||||
map.put("cnt",cnt);
|
||||
map.put("listByBbs",listByBbs);
|
||||
map.put("bbsList",bbsList);
|
||||
return map;
|
||||
}
|
||||
/************************************************************************************
|
||||
* 목록 조회 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 목록조회 폼
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 전체 목록
|
||||
*/
|
||||
public List<DataMap> selectBOBbscttListInqireForm(BOItrntBbscttVO vo) {
|
||||
List<DataMap> bbsList = new ArrayList<>();
|
||||
bbsList = mapper.selectBOBbsList(vo);
|
||||
return bbsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 목록조회
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 전체 목록
|
||||
*/
|
||||
public Map<String, Object> selectBOBbscttListInqire(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
/*공지 여부가 Y인 건수*/
|
||||
Integer ntcCnt = 0;
|
||||
/*총 건수*/
|
||||
Integer totCnt;
|
||||
/*공지 여부에 따른 개수 조회*/
|
||||
BOItrntBbscttVO resultCnt = new BOItrntBbscttVO();
|
||||
resultCnt = mapper.selectBOBbscttListCnt(vo);
|
||||
totCnt = resultCnt.getTotCnt();
|
||||
if (StringUtil.isEmpty(vo.getNtcAt())) {/*공지 제외 검색 조건*/
|
||||
ntcCnt = resultCnt.getNtcCnt();
|
||||
vo.setNtcCnt(ntcCnt);
|
||||
}
|
||||
vo.getPaginationInfo().setTotalRecordCount(totCnt);
|
||||
|
||||
//게시글 답변 조회
|
||||
List<DataMap> answList = new ArrayList<>();
|
||||
//추가항목 조회
|
||||
List<DataMap> qesitmList = new ArrayList<>();
|
||||
if (totCnt > 0 || ntcCnt > 0) {
|
||||
resultList = mapper.selectBOBbscttListInqire(vo);
|
||||
if(!CollectionUtils.isEmpty(resultList)){
|
||||
answList = mapper.selectBOBbscttListQesitmAnswInqire(resultList);
|
||||
qesitmList = mapper.selectBOBbscttQesitmInqire(vo);
|
||||
}
|
||||
}
|
||||
map.put("resultCnt", resultCnt);
|
||||
map.put("resultList", resultList);
|
||||
map.put("answList", answList);
|
||||
map.put("qesitmList", qesitmList);
|
||||
return map;
|
||||
}
|
||||
/*************************************************************************************
|
||||
* 상세조회 service시작
|
||||
*****************************************************************************************/
|
||||
/**
|
||||
* 게시글 상세조회
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return BOItrntBbscttVO 상세조회 결과
|
||||
*/
|
||||
public Map<String, Object> selectBOBbscttDtlInqirePopup(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
//게시글 상세 조회
|
||||
DataMap bbscttInfo = new DataMap();
|
||||
bbscttInfo = mapper.selectBOBbscttDtlInqirePopup(vo);
|
||||
|
||||
// 문항조회
|
||||
List<DataMap> qesitmList = new ArrayList<>();
|
||||
qesitmList = mapper.selectBOBbscttQesitmInqire(vo);
|
||||
|
||||
// 게시글추가문항답변 조회
|
||||
List<DataMap> qesitmAnswList = new ArrayList<>();
|
||||
qesitmAnswList = mapper.selectBOBbscttQesitmAnswInqire(vo);
|
||||
|
||||
// 게시글 파일 정보 조회
|
||||
List<DataMap> fileInfo = new ArrayList<DataMap>();
|
||||
fileInfo = mapper.selectBOFileInfo(vo);
|
||||
|
||||
map.put("dataMap", bbscttInfo);
|
||||
map.put("qesitmAnswList", qesitmAnswList);
|
||||
map.put("qesitmList", qesitmList);
|
||||
map.put("fileInfo", fileInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 답변 상세조회 (게시글 상세조회 페이지)
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return BOItrntBbscttVO 상세조회 결과
|
||||
*/
|
||||
public DataMap selectBOAnswInfoInqire(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
DataMap dataMap = new DataMap();
|
||||
dataMap = mapper.selectBOAnswInfoInqire(vo);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
* 게시글 등록 service시작
|
||||
*****************************************************************************************/
|
||||
/**
|
||||
* 추가문항, 추가문항항목 조회
|
||||
*
|
||||
* @param vo
|
||||
* @return List<DataMap>
|
||||
*/
|
||||
public Map<String, Object> selectBOBbscttRegistPopupForm(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
//추가항목 조회
|
||||
List<DataMap> qesitmList = new ArrayList<>();
|
||||
qesitmList = mapper.selectBOBbscttQesitmInqire(vo);
|
||||
|
||||
//추가항목 항목조회
|
||||
List<DataMap> itmCnList = new ArrayList<>();
|
||||
for (DataMap data : qesitmList) {
|
||||
BigInteger qesitmInnb = (BigInteger) data.get("qesitmInnb");
|
||||
String bbsId = vo.getBbsId();
|
||||
|
||||
DataMap map = new DataMap();
|
||||
map.put("qesitmInnb", qesitmInnb);
|
||||
map.put("bbsId", bbsId);
|
||||
|
||||
List<DataMap> map_ = mapper.selectItmCn(map);
|
||||
|
||||
itmCnList.addAll(map_);
|
||||
}
|
||||
|
||||
//추가항목 리스트, 추가항목 항목 리스트 set
|
||||
Map<String, Object> content = new HashMap();
|
||||
content.put("qesitmList", qesitmList);
|
||||
content.put("itmCnList", itmCnList);
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 등록
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return DataMap 등록 결과
|
||||
*/
|
||||
@Transactional
|
||||
public DataMap insertBOBbscttRegist(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
DataMap message = new DataMap();
|
||||
try {
|
||||
//등록 데이터 set
|
||||
vo.setDepth(0);
|
||||
|
||||
//게시글 등록(fm_boarddata)
|
||||
mapper.insertBOBbscttRegist(vo);
|
||||
|
||||
//파일 정보 set
|
||||
List<HashMap<String, Object>> fileStoreResult = vo.getFileInfo();
|
||||
if (!CollectionUtils.isEmpty(vo.getFileInfo())) {
|
||||
for (int i = 0; i < fileStoreResult.size(); i++) {
|
||||
HashMap<String, Object> fileData = fileStoreResult.get(i);
|
||||
vo.setOrginlFilNm(fileData.get("fileName").toString()); //원본파일명
|
||||
vo.setSysFilNm(fileData.get("fileId").toString()); // 시스템파일명
|
||||
vo.setFilMg(fileData.get("fileSize").toString()); //파일크기
|
||||
vo.setFilTy(fileData.get("fileExt").toString()); //파일타입(확장자)
|
||||
vo.setFilCours(fileData.get("filePath").toString()+File.separator);//파일경로
|
||||
//파일업로드
|
||||
mapper.insertBOBbscttFileUpload(vo);
|
||||
}
|
||||
}
|
||||
|
||||
// 게시글추가문항답변 등록(fm_board_additm)
|
||||
if (vo.getQesitmInnbArr() != null) {
|
||||
//답변 값 존재 안할 시 해당 인덱스 리스트에 add
|
||||
List<Integer> srchIdx = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getAnswCnArr().length; i++) {
|
||||
if (StringUtil.isEmpty(vo.getAnswCnArr()[i])) {
|
||||
srchIdx.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
//문항 고유번호 에서 인덱스 리스트에 포함되지 않은 값 리스트에 add
|
||||
List<String> qesitmInnb = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getQesitmInnbArr().length; i++) {
|
||||
if (!srchIdx.contains(i)) {
|
||||
qesitmInnb.add(vo.getQesitmInnbArr()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//항목 고유번호 에서 인덱스 리스트에 포함되지 않은 값 리스트에 add
|
||||
List<String> itmInnb = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getItmInnbArr().length; i++) {
|
||||
if (!srchIdx.contains(i)) {
|
||||
itmInnb.add(vo.getItmInnbArr()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//답변내용 에서 인덱스 리스트에 포함되지 않은 값 리스트에 add
|
||||
List<String> answCn = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getAnswCnArr().length; i++) {
|
||||
if (!srchIdx.contains(i)) {
|
||||
answCn.add(vo.getAnswCnArr()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//게시글 추가문항 답변 insert
|
||||
DataMap map = new DataMap();
|
||||
if (qesitmInnb != null) {
|
||||
for (int i = 0; i < qesitmInnb.size(); i++) {
|
||||
map.put("sopmalCd", vo.getSopmalCd());
|
||||
map.put("bbscttInnb", vo.getBbscttInnb());
|
||||
map.put("qesitmInnb", qesitmInnb.get(i));
|
||||
map.put("itmInnb", itmInnb.get(i));
|
||||
map.put("answCn", answCn.get(i));
|
||||
map.put("regusr", vo.getRegusr());
|
||||
mapper.insertBOBbscttQesitmAnsw(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/*슈퍼관리자 메시지 발송*/
|
||||
public List<DataMap> selectBOItrntSvMssageSndng(BOItrntBbscttVO vo) {
|
||||
List<DataMap> message = new ArrayList<>();
|
||||
message = mapper.selectBOItrntSvMssageSndng(vo);
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 수정 팝업
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return DataMap 수정 결과
|
||||
*/
|
||||
public Map<String, Object> selectBOBbscttUpdt(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
//게시글 상세 조회
|
||||
DataMap bbscttInfo = new DataMap();
|
||||
bbscttInfo = mapper.selectBOBbscttDtlInqirePopup(vo);
|
||||
|
||||
// 게시글추가문항답변 조회
|
||||
List<DataMap> qesitmAnswList = new ArrayList<>();
|
||||
qesitmAnswList = mapper.selectBOBbscttQesitmAnswInqire(vo);
|
||||
|
||||
// 게시글 파일 정보 조회
|
||||
List<DataMap> fileInfo = new ArrayList<DataMap>();
|
||||
fileInfo = mapper.selectBOFileInfo(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<String, Object>();
|
||||
content.put("bbscttInfo", bbscttInfo);
|
||||
content.put("qesitmAnswList", qesitmAnswList);
|
||||
content.put("fileInfoGson", new Gson().toJson(fileInfo));
|
||||
content.put("fileInfo", fileInfo);
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 게시글 수정
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return DataMap 수정 결과
|
||||
*/
|
||||
@Transactional
|
||||
public DataMap updateBOBbscttUpdt(BOItrntBbscttVO vo){
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
DataMap message = new DataMap();
|
||||
try {
|
||||
|
||||
//게시글 수정(fm_boarddata)
|
||||
mapper.updateBOBbscttUpdt(vo);
|
||||
|
||||
//파일 정보 set
|
||||
List<HashMap<String, Object>> fileStoreResult = vo.getFileInfo();
|
||||
if (vo.getFileInfo() != null) {
|
||||
for (int i = 0; i < fileStoreResult.size(); i++) {
|
||||
HashMap<String, Object> fileData = fileStoreResult.get(i);
|
||||
vo.setOrginlFilNm(fileData.get("fileName").toString()); //원본파일명
|
||||
vo.setSysFilNm(fileData.get("fileId").toString()); // 시스템파일명
|
||||
vo.setFilMg(fileData.get("fileSize").toString()); //파일크기
|
||||
vo.setFilTy(fileData.get("fileExt").toString()); //파일타입(확장자)
|
||||
vo.setFilCours(fileData.get("filePath").toString() + File.separator);//파일경로
|
||||
//파일업로드
|
||||
mapper.insertBOBbscttFileUpload(vo);
|
||||
}
|
||||
}
|
||||
|
||||
// 게시글추가문항답변 삭제
|
||||
mapper.deleteBOAditQesitmPhysiclDel(vo);
|
||||
|
||||
// 게시글추가문항답변 등록
|
||||
if (vo.getQesitmInnbArr() != null) {
|
||||
//답변 값 존재 안할 시 해당 인덱스 리스트에 add
|
||||
List<Integer> srchIdx = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getAnswCnArr().length; i++) {
|
||||
if (StringUtil.isEmpty(vo.getAnswCnArr()[i])) {
|
||||
srchIdx.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
//문항 고유번호 에서 인덱스 리스트에 포함되지 않은 값 리스트에 add
|
||||
List<String> qesitmInnb = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getQesitmInnbArr().length; i++) {
|
||||
if (!srchIdx.contains(i)) {
|
||||
qesitmInnb.add(vo.getQesitmInnbArr()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//항목 고유번호 에서 인덱스 리스트에 포함되지 않은 값 리스트에 add
|
||||
List<String> itmInnb = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getItmInnbArr().length; i++) {
|
||||
if (!srchIdx.contains(i)) {
|
||||
itmInnb.add(vo.getItmInnbArr()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//답변내용 에서 인덱스 리스트에 포함되지 않은 값 리스트에 add
|
||||
List<String> answCn = new ArrayList<>();
|
||||
for (int i = 0; i < vo.getAnswCnArr().length; i++) {
|
||||
if (!srchIdx.contains(i)) {
|
||||
answCn.add(vo.getAnswCnArr()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//게시글 추가문항 답변 insert
|
||||
DataMap map = new DataMap();
|
||||
if (qesitmInnb != null) {
|
||||
for (int i = 0; i < qesitmInnb.size(); i++) {
|
||||
map.put("sopmalCd", vo.getSopmalCd());
|
||||
map.put("bbscttInnb", vo.getBbscttInnb());
|
||||
map.put("qesitmInnb", qesitmInnb.get(i));
|
||||
map.put("itmInnb", itmInnb.get(i));
|
||||
map.put("answCn", answCn.get(i));
|
||||
map.put("regusr", vo.getRegusr());
|
||||
mapper.insertBOBbscttQesitmAnsw(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* 게시글 삭제
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 게시글 삭제
|
||||
*
|
||||
* @param vo
|
||||
* @return DataMap 삭제 결과
|
||||
*/
|
||||
@Transactional
|
||||
public DataMap updateBOBbscttDel(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
DataMap message = new DataMap();
|
||||
try {
|
||||
BigInteger[] bbscttInnbArr = vo.getDelBbscttInnbArr();
|
||||
for (int i = 0; i < bbscttInnbArr.length; i++) {
|
||||
vo.setBbscttInnb(bbscttInnbArr[i]);
|
||||
/*게시글삭제*/
|
||||
mapper.updateBOBbscttDel(vo);
|
||||
/*게시글 평가 논리 삭제*/
|
||||
mapper.deleteBOAditQesitmLogicDel(vo);
|
||||
}
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new WnbtRestException(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
/************************************************************************************
|
||||
* 게시글 세부 기능
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 노출여부 수정
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return DataMap 수정 결과
|
||||
*/
|
||||
public Map<String, Object> updateBOBbscttExpsrAt(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
Map<String, Object> message = new HashMap<String, Object>();
|
||||
try {
|
||||
int result = mapper.updateBOBbscttExpsrAt(vo);
|
||||
message.put("result", result);
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 조회수 수정
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return Integer 수정 결과
|
||||
*/
|
||||
public Integer updateBOBbscttRdcntUpdt(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
Integer inqireCnt = 0;
|
||||
inqireCnt = mapper.updateBOBbscttRdcntUpdt(vo);//조회수 증가
|
||||
if (inqireCnt > 0) {
|
||||
if(mapper.selectReadProvider(vo) == 0){
|
||||
mapper.insertReadProvider(vo);//조회 매장 등록
|
||||
}
|
||||
}
|
||||
return inqireCnt;
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 처리 완료 여부 수정
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 조회 결과
|
||||
*/
|
||||
public Map<String, Object> updateBOBbscttComptAt(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
mapper.updateBOBbscttComptAt(vo);
|
||||
message.put("result", 1);
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new WnbtRestException(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* 답변 등록 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 답변 등록 팝업
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return DataMap 조회 결과
|
||||
*/
|
||||
public Map<String, Object> selectBOBbscttAnswRegistPopupForm(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
//게시글 상세
|
||||
DataMap bbscttInfo = new DataMap();
|
||||
bbscttInfo = mapper.selectBOBbscttDtlInqirePopup(vo);
|
||||
|
||||
Map<String, Object> message = new HashMap<String, Object>();
|
||||
message.put("bbscttInfo", bbscttInfo);
|
||||
return message;
|
||||
}
|
||||
/************************************************************************************
|
||||
* 답변 수정 service 시작
|
||||
*************************************************************************************/
|
||||
/**
|
||||
* 답변 수정 팝업
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return DataMap 조회 결과
|
||||
*/
|
||||
public DataMap selectBOBbscttAnswUpdtPopupForm(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
DataMap message = new DataMap();
|
||||
//게시글 상세 조회
|
||||
DataMap bbsCtt = new DataMap();
|
||||
bbsCtt = mapper.selectBOBbscttDtlInqirePopup(vo);
|
||||
|
||||
// 답변 조회
|
||||
DataMap answ = new DataMap();
|
||||
answ = mapper.selectBOAnswInfoInqire(vo);
|
||||
|
||||
|
||||
message.put("vo", bbsCtt);
|
||||
message.put("answ", answ);
|
||||
return message;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 추가 입력 항목
|
||||
*****************************************************************************/
|
||||
/**
|
||||
* 게시글추가문항답변에 등록된 게시판추가문항항목 조회 (게시글 수정 팝업)
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 조회 결과
|
||||
*/
|
||||
public List<DataMap> selectBOQesitmAnswList(BOItrntBbscttVO vo) {
|
||||
log.debug("BOItrntBbscttVO Service=> {}", vo);
|
||||
List<DataMap> qesitmAnswList = new ArrayList<>();
|
||||
qesitmAnswList = mapper.selectBOBbscttQesitmAnswInqire(vo);
|
||||
return qesitmAnswList;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 슈퍼바이저
|
||||
*****************************************************************************/
|
||||
/**
|
||||
* 슈퍼바이저 등록
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 조회 결과
|
||||
*/
|
||||
public Map<String, Object> insertBOIntranetSv(BOItrntSvVO vo) {
|
||||
log.debug("BOItrntSvVO => {}", vo);
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
int result = mapper.insertBOIntranetSv(vo);
|
||||
message.put("result", result);
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new WnbtRestException(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 슈퍼바이저 삭제
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 조회 결과
|
||||
*/
|
||||
public Map<String, Object> deleteBOIntranetSv(BOItrntSvVO vo) {
|
||||
log.debug("BOItrntSvVO => {}", vo);
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
int result = mapper.deleteBOIntranetSv(vo);
|
||||
message.put("result", result);
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new WnbtRestException(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 슈퍼바이저 조회
|
||||
*
|
||||
* @param vo 파라미터VO
|
||||
* @return List<DataMap> 조회 결과
|
||||
*/
|
||||
public List<DataMap> selectBOIntranetSv(BOItrntSvVO vo) {
|
||||
log.debug("BOItrntSvVO => {}", vo);
|
||||
List<DataMap> result = new ArrayList<>();
|
||||
result = mapper.selectBOIntranetSv(vo);
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 메인화면 팝업 내용 조회
|
||||
*
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
public List<DataMap> selectBbscttPopupContent() {
|
||||
List<DataMap> content = new ArrayList<>();
|
||||
content = mapper.selectBbscttPopupContent();
|
||||
return content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntBbsFormItmVO extends AbstractVO {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8087305150158091337L;
|
||||
/** 문항 번호*/
|
||||
private String qesitmInnb;
|
||||
/** 항목고유 id*/
|
||||
private String itmInnb;
|
||||
/** 항목내용*/
|
||||
private String itmCn;
|
||||
/** 항목순서*/
|
||||
private Integer itmOrdr;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo;
|
||||
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntBbsFormVO extends AbstractVO {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1607485104712731512L;
|
||||
/** 게시판 문항 고유번호*/
|
||||
private String qesitmInnb;
|
||||
/** 게시판 id*/
|
||||
private String bbsInnb;
|
||||
/** 추가항목구분 */
|
||||
private String aditItmDv;
|
||||
/** 문항명 */
|
||||
private String qesitmNm;
|
||||
/** 문항설명 */
|
||||
private String qesitmDc;
|
||||
/** 문항유형 */
|
||||
private String itmTy;
|
||||
/** 문항순서 */
|
||||
private Integer qesitmOrdr;
|
||||
/** 사용여부 */
|
||||
private String useAt;
|
||||
|
||||
/** 게시판 문항의 요소들*/
|
||||
private List<BOItrntBbsFormItmVO> bbsFormItmList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntBbscttVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**고유번호*/
|
||||
private BigInteger bbscttInnb;
|
||||
private BigInteger[] bbscttInnbArr;
|
||||
private BigInteger[] delBbscttInnbArr;
|
||||
|
||||
/**쇼핑몰코드*/
|
||||
private String sopmalCd = "CH";
|
||||
|
||||
/**게시판아이디*/
|
||||
private String bbsId;
|
||||
/**부모게시글고유번호*/
|
||||
private String parntsBbscttInnb;
|
||||
/**DEPTH*/
|
||||
private Integer depth;
|
||||
/**등록자 구분 코드*/
|
||||
private String regusrDvCd;
|
||||
/**등록자ID*/
|
||||
private String regusrId;
|
||||
/**등록자명*/
|
||||
private String regusrNm;
|
||||
/**제목*/
|
||||
private String sj;
|
||||
/**내용*/
|
||||
private String cn;
|
||||
/**조회건수*/
|
||||
private String inqireCnt;
|
||||
/**댓글사용여부*/
|
||||
private String cmUseAt;
|
||||
/**정렬순서*/
|
||||
private int sortOrdr;
|
||||
/**공지 여부*/
|
||||
private String ntcAt;
|
||||
/**노출여부*/
|
||||
private String expsrAt;
|
||||
/**게시기간설정여부*/
|
||||
private String ntcePdSetupAt;
|
||||
/**게시시작일자*/
|
||||
private String ntceBgnDe;
|
||||
/**게시종료일자*/
|
||||
private String ntceEndDe;
|
||||
/**공지기간설정여부*/
|
||||
private String ntcPdSetupAt;
|
||||
/**공지시작일자*/
|
||||
private String ntcBgnDe;
|
||||
/**공지종료일자*/
|
||||
private String ntcEndDe;
|
||||
/**답변휴대폰번호*/
|
||||
private String answMbtlnb;
|
||||
/**답변SMS수신여부*/
|
||||
private String answSmsRecptn;
|
||||
/**팝업여부*/
|
||||
private String popupAt;
|
||||
/**팝업기간 설정여부*/
|
||||
private String popupPdSetupAt;
|
||||
/**팝업노출 시작일시*/
|
||||
private String popupExpsrBgnDt;
|
||||
/**팝업노출 종료일시*/
|
||||
private String popupExpsrEndDt;
|
||||
/**처리완료여부*/
|
||||
private String procsComptAt;
|
||||
/**매장고유번호*/
|
||||
private String strInnb;
|
||||
/**IP*/
|
||||
private String ip;
|
||||
/**AGENT_ID*/
|
||||
private String agentId;
|
||||
/**사용여부*/
|
||||
private String useAt;
|
||||
|
||||
|
||||
/***************게시판관련**************/
|
||||
private String bbsNm;
|
||||
|
||||
/***************검색관련**************/
|
||||
/** 검색구분 */
|
||||
private String srchDv;
|
||||
/** 검색어 */
|
||||
private String srchKeyword;
|
||||
/** 검색 시작일 */
|
||||
private String srchStartDt;
|
||||
/** 검색 종료일 */
|
||||
private String srchEndDt;
|
||||
|
||||
private Integer totCnt;
|
||||
|
||||
private Integer ntcCnt;
|
||||
|
||||
// 추가항목 정보(FM_BOARD_ADDITM)
|
||||
private List<BOItrntBbsFormVO> bbsFormVoList;
|
||||
|
||||
/****************파일관련**************/
|
||||
/**게시글첨부파일고유번호*/
|
||||
private String bbscttAtchmnfilInnb;
|
||||
/**파일구분코드*/
|
||||
private String filDvCd;
|
||||
/**원본파일명*/
|
||||
private String orginlFilNm;
|
||||
/**시스템파일명*/
|
||||
private String sysFilNm;
|
||||
/**파일크기*/
|
||||
private String filMg;
|
||||
/**파일타입*/
|
||||
private String filTy;
|
||||
/**파일경로*/
|
||||
private String filCours;
|
||||
/**파일정보*/
|
||||
private List<HashMap<String, Object>> fileInfo;
|
||||
/**매장구분*/
|
||||
private String strDv;
|
||||
/**작성자구분코드 슈퍼바이저 타겟 대상인*/
|
||||
private String writeDvCd;
|
||||
|
||||
/***************추가문항답변**********/
|
||||
/**문항답변고유번호*/
|
||||
private String qesitmAnswInnb;
|
||||
/**문항고유번호*/
|
||||
private String qesitmInnb;
|
||||
private String[] qesitmInnbArr;
|
||||
|
||||
/**항목고유번호*/
|
||||
private String itmInnb;
|
||||
private String[] itmInnbArr;
|
||||
|
||||
/**답변내용*/
|
||||
private String answCn;
|
||||
private String[] answCnArr;
|
||||
|
||||
/******************GC_BOARD_READ(인트라넷 게시판 구독 매장)*****************/
|
||||
/**고유번호*/
|
||||
private String readInnb;
|
||||
/**입점사 아이디*/
|
||||
private String tentcpnId;
|
||||
/**입점사명*/
|
||||
private String tentcpnNm;
|
||||
/**구독일시*/
|
||||
private String readDt;
|
||||
/*구독 수량*/
|
||||
private String readCnt;
|
||||
/******************GC_INTRANET_SV(수퍼바이저 정보)*****************/
|
||||
/**고유번호*/
|
||||
private String svInnb;
|
||||
/**슈퍼관리자구분*/
|
||||
private String svWriteDvCd;
|
||||
/**관리자이름*/
|
||||
private String mngrNm;
|
||||
/**관리자휴대폰번호*/
|
||||
private String mngrMbtlnb;
|
||||
|
||||
/******************시크릿키*****************/
|
||||
private String secretKey;
|
||||
/******************입점사*****************/
|
||||
/*입점사구분*/
|
||||
private String tentGroup;
|
||||
/*가맹,직영,유통구분*/
|
||||
private String strOperDv;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.bbsctt.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntSvVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*시크릿키*/
|
||||
private String secretKey;
|
||||
/*슈퍼관리자고유번호*/
|
||||
private String svInnb;
|
||||
/*게시판아이디*/
|
||||
private String bbsId;
|
||||
/*슈퍼관리자작성구분코드*/
|
||||
private String svWriteDvCd;
|
||||
/*관리자명*/
|
||||
private String mngrNm;
|
||||
/*관리자전화번호*/
|
||||
private String mngrMbtlnb;
|
||||
/*사용여부*/
|
||||
private String useAt;
|
||||
/******************입점사*****************/
|
||||
/*입점사구분*/
|
||||
private String tentGroup;
|
||||
/*가맹,직영,유통구분*/
|
||||
private String strOperDv;
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.cm.controller;
|
||||
|
||||
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.vo.BOBbsVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.cm.service.BOItrntCmService;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.cm.vo.BOItrntCmVO;
|
||||
import com.wb.domainserver.response.ApiResponse;
|
||||
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.SendToResrc;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/itrnt/bbs/cm")
|
||||
public class BOItrntCmController {
|
||||
|
||||
@Autowired
|
||||
private BOItrntCmService service;
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
/**
|
||||
* 댓글 조회
|
||||
* @param cm
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOCmList")
|
||||
public ResponseEntity<?> selectBOCmList(@RequestBody BOItrntCmVO cm){
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
cm.setRegusr(user.getUserInnb());
|
||||
cm.setStrInnb(user.getUserInnb());
|
||||
cm.setTentGroup(user.getTentGroup());
|
||||
|
||||
// pagination
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(cm.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(cm.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
cm.setPaginationInfo(paginationInfo);
|
||||
cm.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
cm.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
cm.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
|
||||
//작성자 정보
|
||||
BOItrntCmVO regusrInfo = new BOItrntCmVO();
|
||||
if("01".equals(regusrInfo.getTentGroup())){
|
||||
regusrInfo.setRegusrNm("관리자");
|
||||
}else{
|
||||
regusrInfo.setRegusrNm(user.getTentcpnNm());
|
||||
}
|
||||
regusrInfo.setRegusrId(user.getMbrId());
|
||||
|
||||
//게시판 설정 정보 조회
|
||||
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||
BOBbsVO bbsVO = new BOBbsVO();
|
||||
bbsVO.setBbsId(cm.getBbsId());
|
||||
|
||||
// 댓글 목록 조회, 건수, 작성자 정보 조회
|
||||
Map<String,Object> cmList = service.selectBOCmList(cm);
|
||||
|
||||
Map<String,Object> content = new HashMap<>();
|
||||
content.put("cmList", cmList);
|
||||
content.put("regusrInfo", regusrInfo);
|
||||
content.put("cmVO", cm);
|
||||
content.put("paginationInfo", cm.getPaginationInfo());
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 등록
|
||||
* @param cm 댓글 파라미터VO
|
||||
* @return ResponseEntity<?> 등록 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBOCmRegist")
|
||||
public ResponseEntity<?> insertBOCmRegist(@RequestBody BOItrntCmVO cm) {
|
||||
DataMap content = new DataMap();
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getTentGroup())){
|
||||
cm.setRegusrDvCd("02");
|
||||
cm.setRegusrNm("관리자");
|
||||
}else{
|
||||
cm.setRegusrDvCd("04");
|
||||
cm.setRegusrNm(user.getTentcpnNm());
|
||||
}
|
||||
cm.setRegusrId(user.getMbrId());
|
||||
cm.setRegusr(user.getUserInnb());
|
||||
cm.setUpdusr(user.getUserInnb());
|
||||
DataMap map = new DataMap();
|
||||
map = service.insertBOCmRegist(cm);
|
||||
content.put("map", map);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 수정
|
||||
* @param cm 댓글 파라미터VO
|
||||
* @return ResponseEntity<?> 수정 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOCmUpdt")
|
||||
public ResponseEntity<?> updateBOCmUpdt(@RequestBody BOItrntCmVO cm) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
DataMap content = new DataMap();
|
||||
DataMap map = new DataMap();
|
||||
cm.setUpdusr(user.getUserInnb());
|
||||
map = service.updateBOCmUpdt(cm);
|
||||
content.put("map", map);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 삭제
|
||||
* @param cm 댓글 파라미터VO
|
||||
* @return ResponseEntity<?> 수정 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/deleteBOCmDel")
|
||||
public ResponseEntity<?> deleteBOCmDel(@RequestBody BOItrntCmVO cm) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
DataMap content = new DataMap();
|
||||
DataMap map = new DataMap();
|
||||
cm.setUpdusr(user.getUserInnb());
|
||||
map = service.updateBOCmDel(cm);
|
||||
content.put("map", map);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.cm.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.bbs.cm.vo.BOItrntCmVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntCmMapper {
|
||||
/** 댓글 목록 건수 조회 */
|
||||
public int selectBOBCmListCnt(BOItrntCmVO cm);
|
||||
/** 댓글 목록 조회 */
|
||||
public List<DataMap> selectBOCmListInqire(BOItrntCmVO cm);
|
||||
/** 대댓글 목록 조회 */
|
||||
public List<DataMap> selectBOCmAnswListInqire(BOItrntCmVO cm);
|
||||
/*댓글 수정,삭제 가능 조회 (수정,삭제시 여부 판단 후 수정, 삭제)*/
|
||||
public boolean selectCmUpdtDelPosibleAt(BOItrntCmVO vo);
|
||||
/** 댓글 등록 */
|
||||
public Integer insertBOCmRegist(BOItrntCmVO cm);
|
||||
/** 댓글 수정 */
|
||||
public Integer updateBOCmUpdt(BOItrntCmVO cm);
|
||||
/** 댓글 논리 삭제 */
|
||||
public Integer updateBOCmDel(DataMap map);
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.cm.service;
|
||||
|
||||
import com.wb.domainserver.domain.gcone.bbs.gnrlbbsctt.service.BOGnrlbbscttService;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.bbsctt.service.BOItrntBbscttService;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.cm.mapper.BOItrntCmMapper;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.cm.vo.BOItrntCmVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BOItrntCmService {
|
||||
@Autowired
|
||||
private BOItrntCmMapper mapper;
|
||||
/**
|
||||
* 댓글 목록 조회
|
||||
* @param cm 파라미터VO
|
||||
* @return totCnt 목록 건수
|
||||
*/
|
||||
public Map<String,Object> selectBOCmList(BOItrntCmVO cm){
|
||||
Map<String,Object> map = new HashMap<String, Object>();
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
List<DataMap> cmAnswList = new ArrayList<>();
|
||||
Integer totCnt;
|
||||
totCnt = mapper.selectBOBCmListCnt(cm);
|
||||
cm.getPaginationInfo().setTotalRecordCount(totCnt);
|
||||
//댓글 조회
|
||||
if (totCnt > 0) {
|
||||
resultList = mapper.selectBOCmListInqire(cm);
|
||||
/*대댓글 조회*/
|
||||
if(resultList != null) {
|
||||
List<BigInteger> cmInnbList = new ArrayList<>();
|
||||
for (int i = 0; resultList.size() > i; i++) {
|
||||
BigInteger cmInnb = ((BigInteger) resultList.get(i).get("cmInnb"));
|
||||
cmInnbList.add(cmInnb);
|
||||
}
|
||||
cm.setCmInnbArr(cmInnbList);
|
||||
cmAnswList = mapper.selectBOCmAnswListInqire(cm);
|
||||
}
|
||||
}
|
||||
//댓글 개수(댓글 개수 + 대댓글 개수)
|
||||
int cmCnt = (CollectionUtils.isEmpty(cmAnswList)) ? 0: cmAnswList.size();
|
||||
cmCnt = cmCnt + totCnt;
|
||||
map.put("cmCnt",cmCnt);
|
||||
map.put("cmList",resultList);
|
||||
map.put("cmAnswList",cmAnswList);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 등록
|
||||
* @param cm 파라미터VO
|
||||
* @return Integer 등록결과
|
||||
*/
|
||||
public DataMap insertBOCmRegist(BOItrntCmVO cm){
|
||||
DataMap message = new DataMap();
|
||||
try {
|
||||
//댓글 구분(댓글 or 대댓글)
|
||||
if(StringUtil.isEmpty(cm.getCmInnb())) {
|
||||
cm.setDepth(0);
|
||||
} else {
|
||||
cm.setParntsCmInnb(cm.getCmInnb());
|
||||
cm.setDepth(1);
|
||||
}
|
||||
log.debug("cm확인 {}", cm);
|
||||
mapper.insertBOCmRegist(cm);
|
||||
message.put("result","success");
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new WnbtRestException(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 수정
|
||||
* @param cm 파라미터VO
|
||||
* @return Integer 수정결과
|
||||
*/
|
||||
public DataMap updateBOCmUpdt(BOItrntCmVO cm){
|
||||
DataMap message = new DataMap();
|
||||
try {
|
||||
if (mapper.selectCmUpdtDelPosibleAt(cm)) {
|
||||
mapper.updateBOCmUpdt(cm);
|
||||
message.put("result",1);
|
||||
}else{
|
||||
message.put("result",0); //등록자 외 수정 불가능
|
||||
}
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new WnbtRestException(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
/**
|
||||
* 댓글 논리 삭제
|
||||
* @param cm 파라미터VO
|
||||
* @return Integer 삭제결과
|
||||
*/
|
||||
public DataMap updateBOCmDel(BOItrntCmVO cm){
|
||||
DataMap message = new DataMap();
|
||||
try {
|
||||
if (mapper.selectCmUpdtDelPosibleAt(cm)) {
|
||||
String[] delCmInnb = cm.getDelCmInnbArr();
|
||||
DataMap map = new DataMap();
|
||||
map.put("bbsId", cm.getBbsId());
|
||||
map.put("bbscttInnb", cm.getBbscttInnb());
|
||||
map.put("useAt", "N");
|
||||
map.put("updusr", cm.getUpdusr());
|
||||
map.put("sopmalCd", cm.getSopmalCd());
|
||||
for (int i = 0; i < delCmInnb.length; i++) {
|
||||
map.put("cmInnb", delCmInnb[i]);
|
||||
mapper.updateBOCmDel(map);
|
||||
}
|
||||
message.put("result",1);
|
||||
}else{
|
||||
message.put("result",0); //등록자 외 삭제 불가능
|
||||
}
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new WnbtRestException(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.cm.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntCmVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*매장고유번호*/
|
||||
private int strInnb;
|
||||
/**댓글 고유번호 리스트*/
|
||||
private List<BigInteger> cmInnbArr;
|
||||
/**삭제 댓글 고유번호 리스트*/
|
||||
private String[] delCmInnbArr;
|
||||
/**게시판아이디*/
|
||||
private String bbsId;
|
||||
/**댓글고유번호*/
|
||||
private String cmInnb;
|
||||
/**게시글고유번호*/
|
||||
private String bbscttInnb;
|
||||
/**부모댓글고유번호*/
|
||||
private String parntsCmInnb;
|
||||
/**DEPTH*/
|
||||
private Integer depth;
|
||||
/**등록자구분*/
|
||||
private String regusrDvCd;
|
||||
/**등록자아이디*/
|
||||
private String regusrId;
|
||||
/**등록자명*/
|
||||
private String regusrNm;
|
||||
/**내용*/
|
||||
private String cn;
|
||||
/**비밀댓글여부*/
|
||||
private String secretBbscttAt;
|
||||
/**조회수*/
|
||||
private String inqireCnt;
|
||||
/**아이피*/
|
||||
private String ip;
|
||||
/**에이전트아이디*/
|
||||
private String agentId;
|
||||
/**사용여부*/
|
||||
private String useAt;
|
||||
/*쇼핑몰코드*/
|
||||
private String sopmalCd;
|
||||
/*입점사 그룹*/
|
||||
private String tentGroup;
|
||||
}
|
||||
@@ -0,0 +1,530 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.vo.ItrntBbscttVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.vo.ItrntCmVO;
|
||||
import com.wb.domainserver.domain.itrnt.bbs.vo.ItrntSvVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.file.service.FileStorageService;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import com.wb.domainserver.util.util.Util;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 인트라넷 마이페이지 게시판
|
||||
* @author 김혜인
|
||||
* @since 2024-03-06
|
||||
* @version 1.0
|
||||
* @see
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-11-12 김혜인. 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/bbs")
|
||||
public class ItrntBbsController {
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/** 파일 업로드 */
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
|
||||
/**
|
||||
* 게시글 목록 조회 폼
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBbscttListInqireForm")
|
||||
public String selectBbscttListInqireForm(ModelMap model, HttpServletRequest request, ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBOBbscttListInqireForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/bbs/ItrntBbscttListFormR";
|
||||
}
|
||||
|
||||
/**
|
||||
*게시글 목록 조회
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBbscttListInqire")
|
||||
public String selectBbscttListInqire(ModelMap model, HttpServletRequest request, ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBOBbscttListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/bbs/ItrntBbscttListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 상세 조회
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBbscttDtlInqirePopup")
|
||||
public String selectBbscttDtlInqirePopup(ModelMap model, HttpServletRequest request, ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBOBbscttDtlInqirePopup", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//ip주소 get
|
||||
Map<String, String> req = Util.getRequestInfo(request);
|
||||
String ip = req.get("XForwardedFor");
|
||||
|
||||
model.addAttribute("ip",ip);
|
||||
return "itrnt/bbs/ItrntBbscttDtlFormR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectCmList")
|
||||
public String selectCmList(ModelMap model, HttpServletRequest request, ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/cm/selectBOCmList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//ip주소 get
|
||||
Map<String, String> req = Util.getRequestInfo(request);
|
||||
String ip = req.get("XForwardedFor");
|
||||
model.addAttribute("ip",ip);
|
||||
return "itrnt/bbs/ItrntCmListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 등록
|
||||
* @param cm 파라미터 vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertBbscttCmRegist")
|
||||
public ResponseEntity<WnbtResponse> insertBbscttCmRegist(HttpServletRequest request , @Validated ItrntCmVO cm, BindingResult bindingResult, HttpSession session){
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
//ip주소 get
|
||||
Map<String,String> req = Util.getRequestInfo(request);
|
||||
String ip = req.get("XForwardedFor");
|
||||
cm.setIp(ip);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/cm/insertBOCmRegist", cm),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 수정
|
||||
* @param cm 파라미터 vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateBbscttCmUpdt" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateBbscttCmUpdt(@Validated ItrntCmVO cm, BindingResult bindingResult, HttpSession session){
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/cm/updateBOCmUpdt", cm),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/** 댓글 삭제
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/deleteCmDel")
|
||||
public ResponseEntity<?> deleteCmDel(ItrntCmVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/cm/deleteBOCmDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 논리 삭제
|
||||
*
|
||||
* @param cm 파라미터 vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteBbscttCmDel", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> deleteBbscttCmDel(ItrntCmVO cm, BindingResult bindingResult, HttpSession session) {
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/cm/deleteBOCmDel", cm),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 등록 팝업
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBbscttRegistPopupForm")
|
||||
public String selectBbscttRegistPopupForm(ModelMap model, HttpServletRequest request, ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBOBbscttRegistPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
//ip주소 get
|
||||
Map<String, String> req = Util.getRequestInfo(request);
|
||||
String ip = req.get("XForwardedFor");
|
||||
|
||||
model.addAttribute("ip", ip);
|
||||
|
||||
return "itrnt/bbs/ItrntBbscttRegistFormC";
|
||||
}
|
||||
|
||||
/** 게시글 등록
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBbscttRegist")
|
||||
public ResponseEntity<?> insertBbscttRegist(HttpServletRequest request,@Validated ItrntBbscttVO vo, BindingResult bindingResult) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
//validation체크
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
} else if (true) {
|
||||
//팝업 여부가 'Y'이고 노출 기간 제한 '기본'일 시 날짜 지정 여부 체크
|
||||
if ("Y".equals(vo.getPopupAt()) && "Y".equals(vo.getPopupPdSetupAt())) {
|
||||
if (StringUtil.isEmpty(vo.getNtceBgnDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("popupExpsrBgnDt", gconeMessageSource.getMessage("errors.required", new Object[]{"팝업 시작일"})));
|
||||
}
|
||||
if (StringUtil.isEmpty(vo.getNtceEndDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("popupExpsrEndDt", gconeMessageSource.getMessage("errors.required", new Object[]{"팝업 종료일"})));
|
||||
}
|
||||
}
|
||||
//공지글 등록 여부가 'Y'이고 공지 기간 제한 '기본'일 시 날짜 지정 여부 체크
|
||||
if ("Y".equals(vo.getNtcAt()) && "Y".equals(vo.getNtcPdSetupAt())) {
|
||||
if (StringUtil.isEmpty(vo.getNtcBgnDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("ntcBgnDe", gconeMessageSource.getMessage("errors.required", new Object[]{"공지 시작일"})));
|
||||
}
|
||||
if (StringUtil.isEmpty(vo.getNtcEndDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("ntcEndDe", gconeMessageSource.getMessage("errors.required", new Object[]{"공지 종료일"})));
|
||||
}
|
||||
}
|
||||
//순서 여부가 'Y'이고 순서 값 없을 시
|
||||
if ("Y".equals(vo.getSortOrdrAt())) {
|
||||
if (vo.getSortOrdr() == null) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("sortOrdr", gconeMessageSource.getMessage("errors.required", new Object[]{"순서"})));
|
||||
}
|
||||
}
|
||||
//필수 입력 여부설정이 Y 이고 입력 여부가 N일 시 validation 체크
|
||||
if (vo.getQesitmEssntlAtArr() != null) {
|
||||
for (int idx = 0; idx < vo.getQesitmEssntlAtArr().length; idx++) {
|
||||
if ("Y".equals(vo.getQesitmEssntlAtArr()[idx]) && "N".equals(vo.getQesitmAtArr()[idx])) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("answCnArr", gconeMessageSource.getMessage("errors.required", new Object[]{vo.getQesitmNmArr()[idx]})));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (errorList != null
|
||||
&& errorList.size() > 0) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||
}
|
||||
|
||||
//파일 경로 설정 (수정)
|
||||
List<HashMap<String, Object>> file = new ArrayList<HashMap<String, Object>>();
|
||||
request.setAttribute("shopCd", vo.getSopmalCd()); //쇼핑몰 코드
|
||||
request.setAttribute("subPathId", vo.getBbsId()); //게시판 아이디
|
||||
List<HashMap<String, Object>> ulpladFileMap = new ArrayList<HashMap<String, Object>>();
|
||||
|
||||
//파일 첨부 등록
|
||||
request.setAttribute("pathGubun", "BDFL");//게시판 일반첨부파일 구분
|
||||
request.setAttribute("validExp", vo.getFilPermFilExtsn());//게시판 일반첨부파일 구분
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
log.debug("파일 확인{}",ulpladFileMap);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
|
||||
/*agentId set*/
|
||||
String agentId = "";
|
||||
|
||||
// 쿠키를 가져옴
|
||||
Cookie[] cookies = request.getCookies();
|
||||
|
||||
//agentId 쿠키 있을 경우 가져옴
|
||||
if (cookies != null) {
|
||||
for (Cookie cookie : cookies) {
|
||||
if (cookie.getName().equals("agent_id")) {
|
||||
agentId = cookie.getValue();
|
||||
vo.setAgentId(agentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
//ip set
|
||||
Map<String, String> req = new HashMap<>();
|
||||
req = Util.getRequestInfo(request);
|
||||
String ip = req.get("XForwardedFor");
|
||||
vo.setIp(ip);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/insertBOBbscttRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*게시글 수정 팝업
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBbscttUpdtPopupForm")
|
||||
public String selectBbscttUpdtPopupForm(ModelMap model, HttpServletRequest request, ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBOBbscttUpdtPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/bbs/ItrntBbscttUpdtFormU";
|
||||
}
|
||||
|
||||
/** 게시글 수정
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBbscttUpdt")
|
||||
public ResponseEntity<?> updateBbscttUpdt(HttpServletRequest request,@Validated ItrntBbscttVO vo, BindingResult bindingResult) {
|
||||
log.debug("vo 확인 ==> {}", vo);
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
//validation체크
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
} else if (true) {
|
||||
//팝업 여부가 'Y'이고 노출 기간 제한 '기본'일 시 날짜 지정 여부 체크
|
||||
if ("Y".equals(vo.getPopupAt()) && "Y".equals(vo.getPopupPdSetupAt())) {
|
||||
if (StringUtil.isEmpty(vo.getNtceBgnDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("popupExpsrBgnDt", gconeMessageSource.getMessage("errors.required", new Object[]{"팝업 시작일"})));
|
||||
}
|
||||
if (StringUtil.isEmpty(vo.getNtceEndDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("popupExpsrEndDt", gconeMessageSource.getMessage("errors.required", new Object[]{"팝업 종료일"})));
|
||||
}
|
||||
}
|
||||
//공지글 등록 여부가 'Y'이고 공지 기간 제한 '기본'일 시 날짜 지정 여부 체크
|
||||
if ("Y".equals(vo.getNtcAt()) && "Y".equals(vo.getNtcPdSetupAt())) {
|
||||
if (StringUtil.isEmpty(vo.getNtcBgnDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("ntcBgnDe", gconeMessageSource.getMessage("errors.required", new Object[]{"공지 시작일"})));
|
||||
}
|
||||
if (StringUtil.isEmpty(vo.getNtcEndDe())) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("ntcEndDe", gconeMessageSource.getMessage("errors.required", new Object[]{"공지 종료일"})));
|
||||
}
|
||||
}
|
||||
//순서 여부가 'Y'이고 순서 값 없을 시
|
||||
if ("Y".equals(vo.getSortOrdrAt())) {
|
||||
if (vo.getSortOrdr() == null) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("sortOrdr", gconeMessageSource.getMessage("errors.required", new Object[]{"순서"})));
|
||||
}
|
||||
}
|
||||
//필수 입력 여부설정이 Y 이고 입력 여부가 N일 시 validation 체크
|
||||
if (vo.getQesitmEssntlAtArr() != null) {
|
||||
for (int idx = 0; idx < vo.getQesitmEssntlAtArr().length; idx++) {
|
||||
if ("Y".equals(vo.getQesitmEssntlAtArr()[idx]) && "N".equals(vo.getQesitmAtArr()[idx])) {
|
||||
errorList.add(ValidateResultConverter.setErrorMap("answCnArr", gconeMessageSource.getMessage("errors.required", new Object[]{vo.getQesitmNmArr()[idx]})));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (errorList != null
|
||||
&& errorList.size() > 0) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||
}
|
||||
|
||||
//파일 경로 설정 (수정)
|
||||
List<HashMap<String, Object>> file = new ArrayList<HashMap<String, Object>>();
|
||||
request.setAttribute("shopCd", vo.getSopmalCd()); //쇼핑몰 코드
|
||||
request.setAttribute("subPathId", vo.getBbsId()); //게시판 아이디
|
||||
List<HashMap<String, Object>> ulpladFileMap = new ArrayList<HashMap<String, Object>>();
|
||||
|
||||
//파일 첨부 등록
|
||||
request.setAttribute("pathGubun", "BDFL");//게시판 일반첨부파일 구분
|
||||
request.setAttribute("validExp", vo.getFilPermFilExtsn());//게시판 일반첨부파일 구분
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
log.debug("파일 확인{}", ulpladFileMap);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
|
||||
/*agentId set*/
|
||||
Map<String, String> req = new HashMap<>();
|
||||
req = Util.getRequestInfo(request);
|
||||
String agentId = req.get("userAgent");
|
||||
vo.setAgentId(agentId);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/updateBOBbscttUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/** 게시글 논리 삭제
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBbscttDel")
|
||||
public ResponseEntity<?> updateBbscttDel(ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/updateBOBbscttDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/** 노출여부 수정
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBbscttExpsrAt")
|
||||
public ResponseEntity<?> updateBbscttExpsrAt(ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/updateBOBbscttExpsrAt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 완료,반려처리
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateProcsComptAt")
|
||||
public ResponseEntity<?> updateProcsComptAt(ModelMap model, HttpServletRequest request, ItrntBbscttVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/updateBOBbscttComptAt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 슈퍼바이저 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectIntranetSv")
|
||||
public String selectIntranetSv(ModelMap model, HttpServletRequest request, ItrntSvVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBOIntranetSv", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/bbs/ItrntSvManagerFormR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 슈퍼바이저 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectIntranetSvAjax")
|
||||
public ResponseEntity<?> selectIntranetSvAjax(ModelMap model, HttpServletRequest request, ItrntSvVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBOIntranetSv", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/** 슈퍼바이저 등록
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertIntranetSv")
|
||||
public ResponseEntity<?> insertIntranetSv(@Validated ItrntSvVO vo, BindingResult bindingResult) {
|
||||
if(bindingResult.hasErrors()){
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/insertBOIntranetSv", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/** 슈퍼바이저 삭제
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/deleteIntranetSv")
|
||||
public ResponseEntity<?> deleteIntranetSv(ItrntSvVO vo) {
|
||||
log.debug("vo 확인 ==> {}",vo);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/deleteBOIntranetSv", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BbsFormItmVO extends AbstractVO{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8087305150158091337L;
|
||||
/** 문항 번호*/
|
||||
private String qesitmInnb;
|
||||
/** 항목고유 id*/
|
||||
private String itmInnb;
|
||||
/** 항목내용*/
|
||||
private String itmCn;
|
||||
/** 항목순서*/
|
||||
private Integer itmOrdr;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.vo;
|
||||
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BbsFormVO extends AbstractVO{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1607485104712731512L;
|
||||
/** 게시판 문항 고유번호*/
|
||||
private String qesitmInnb;
|
||||
/** 게시판 id*/
|
||||
private String bbsInnb;
|
||||
/** 추가항목구분 */
|
||||
private String aditItmDv;
|
||||
/** 문항명 */
|
||||
private String qesitmNm;
|
||||
/** 문항설명 */
|
||||
private String qesitmDc;
|
||||
/** 문항유형 */
|
||||
private String itmTy;
|
||||
/** 문항순서 */
|
||||
private Integer qesitmOrdr;
|
||||
/** 사용여부 */
|
||||
private String useAt;
|
||||
|
||||
/** 게시판 문항의 요소들*/
|
||||
private List<BbsFormItmVO> bbsFormItmList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntBbscttVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**고유번호*/
|
||||
private BigInteger bbscttInnb;
|
||||
private BigInteger[] bbscttInnbArr;
|
||||
private BigInteger[] delBbscttInnbArr;
|
||||
|
||||
/**쇼핑몰코드*/
|
||||
private String sopmalCd = "CH";
|
||||
/**게시판아이디*/
|
||||
private String bbsId;
|
||||
/**부모게시글고유번호*/
|
||||
private String parntsBbscttInnb;
|
||||
/**DEPTH*/
|
||||
private Integer depth;
|
||||
/**등록자 구분 코드*/
|
||||
private String regusrDvCd;
|
||||
/**등록자ID*/
|
||||
private String regusrId;
|
||||
/**등록자명*/
|
||||
private String regusrNm;
|
||||
/**제목*/
|
||||
@NotBlank(message = "제목")
|
||||
private String sj;
|
||||
/**내용*/
|
||||
@NotBlank(message = "내용")
|
||||
private String cn;
|
||||
/**조회건수*/
|
||||
private String inqireCnt;
|
||||
/**댓글사용여부*/
|
||||
private String cmUseAt;
|
||||
/**정렬순서여부*/
|
||||
private String sortOrdr;
|
||||
/**정렬순서*/
|
||||
private String sortOrdrAt;
|
||||
/**공지 여부*/
|
||||
private String ntcAt;
|
||||
/**노출여부*/
|
||||
private String expsrAt;
|
||||
/**게시기간설정여부*/
|
||||
private String ntcePdSetupAt;
|
||||
/**게시시작일자*/
|
||||
private String ntceBgnDe;
|
||||
/**게시종료일자*/
|
||||
private String ntceEndDe;
|
||||
/**공지기간설정여부*/
|
||||
private String ntcPdSetupAt;
|
||||
/**공지시작일자*/
|
||||
private String ntcBgnDe;
|
||||
/**공지종료일자*/
|
||||
private String ntcEndDe;
|
||||
/**답변휴대폰번호*/
|
||||
private String answMbtlnb;
|
||||
/**답변SMS수신여부*/
|
||||
private String answSmsRecptn;
|
||||
/**팝업여부*/
|
||||
private String popupAt;
|
||||
/**팝업기간 설정여부*/
|
||||
private String popupPdSetupAt;
|
||||
/**팝업노출 시작일시*/
|
||||
private String popupExpsrBgnDt;
|
||||
/**팝업노출 종료일시*/
|
||||
private String popupExpsrEndDt;
|
||||
/**처리완료여부*/
|
||||
private String procsComptAt;
|
||||
/**매장고유번호*/
|
||||
private String strInnb;
|
||||
/**IP*/
|
||||
private String ip;
|
||||
/**AGENT_ID*/
|
||||
private String agentId;
|
||||
/**사용여부*/
|
||||
private String useAt;
|
||||
/**물류관련유형 문의 유형*/
|
||||
private String writeDvCd;
|
||||
/**매장구분*/
|
||||
private String strDv;
|
||||
|
||||
/*게시판관련*/
|
||||
private String bbsNm;
|
||||
|
||||
/*대시보드 여부*/
|
||||
private String dashAt;
|
||||
/***************검색관련**************/
|
||||
/** 검색구분 */
|
||||
private String srchDv;
|
||||
/** 검색어 */
|
||||
private String srchKeyword;
|
||||
/** 검색 시작일 */
|
||||
private String srchStartDt;
|
||||
/** 검색 종료일 */
|
||||
private String srchEndDt;
|
||||
|
||||
private Integer totCnt;
|
||||
|
||||
private Integer ntcCnt;
|
||||
|
||||
// 추가항목 정보(FM_BOARD_ADDITM)
|
||||
private List<BbsFormVO> bbsFormVoList;
|
||||
/****************파일관련**************/
|
||||
/**게시글첨부파일고유번호*/
|
||||
private String bbscttAtchmnfilInnb;
|
||||
/**파일구분코드*/
|
||||
private String filDvCd;
|
||||
/**원본파일명*/
|
||||
private String orginlFilNm;
|
||||
/**시스템파일명*/
|
||||
private String sysFilNm;
|
||||
/**파일크기*/
|
||||
private String filMg;
|
||||
/**파일타입*/
|
||||
private String filTy;
|
||||
/**파일경로*/
|
||||
private String filCours;
|
||||
/**파일정보*/
|
||||
private List<HashMap<String, Object>> fileInfo;
|
||||
/*파일허용확장자*/
|
||||
private String filPermFilExtsn;
|
||||
|
||||
/***************추가문항답변**********/
|
||||
/**문항필수배열*/
|
||||
private String[] qesitmEssntlAtArr;
|
||||
/**문항답변여부*/
|
||||
private String[] qesitmAtArr;
|
||||
/**문항명*/
|
||||
private String[] qesitmNmArr;
|
||||
/**문항답변고유번호*/
|
||||
private String qesitmAnswInnb;
|
||||
/**문항고유번호*/
|
||||
private String qesitmInnb;
|
||||
private String[] qesitmInnbArr;
|
||||
|
||||
/**항목고유번호*/
|
||||
private String itmInnb;
|
||||
private String[] itmInnbArr;
|
||||
|
||||
/**답변내용*/
|
||||
private String answCn;
|
||||
private String[] answCnArr;
|
||||
|
||||
/******************슈퍼바이저*****************/
|
||||
private String svInnb;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntCmVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*쇼핑몰 코드 */
|
||||
private String sopmalCd = "CH";
|
||||
/**댓글 고유번호 리스트*/
|
||||
private List<BigInteger> cmInnbArr;
|
||||
/**삭제 댓글 고유번호 리스트*/
|
||||
private String[] delCmInnbArr;
|
||||
/**게시판아이디*/
|
||||
private String bbsId;
|
||||
/**댓글고유번호*/
|
||||
private String cmInnb;
|
||||
/**게시글고유번호*/
|
||||
private String bbscttInnb;
|
||||
/**부모댓글고유번호*/
|
||||
private String parntsCmInnb;
|
||||
/**DEPTH*/
|
||||
private Integer depth;
|
||||
/**등록자구분*/
|
||||
private String regusrDvCd;
|
||||
/**등록자아이디*/
|
||||
private String regusrId;
|
||||
/**등록자명*/
|
||||
private String regusrNm;
|
||||
/**내용*/
|
||||
private String cn;
|
||||
/**비밀댓글여부*/
|
||||
private String secretBbscttAt;
|
||||
/**조회수*/
|
||||
private String inqireCnt;
|
||||
/**아이피*/
|
||||
private String ip;
|
||||
/**에이전트아이디*/
|
||||
private String agentId;
|
||||
/**사용여부*/
|
||||
private String useAt;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.wb.domainserver.domain.itrnt.bbs.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntSvVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*슈퍼관리자고유번호*/
|
||||
private String svInnb;
|
||||
/*게시판아이디*/
|
||||
private String bbsId = "logistics_req";
|
||||
/*슈퍼관리자작성구분코드*/
|
||||
@NotBlank(message="담당 카테고리")
|
||||
private String svWriteDvCd;
|
||||
/*관리자명*/
|
||||
@NotBlank(message="이름")
|
||||
private String mngrNm;
|
||||
/*관리자전화번호*/
|
||||
@NotBlank(message="휴대폰번호")
|
||||
private String mngrMbtlnb;
|
||||
/*사용여부*/
|
||||
private String useAt;
|
||||
}
|
||||
Reference in New Issue
Block a user