초기소스
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;
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.cnslt.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.crm.cnslt.vo.CrmCnsltVO;
|
||||
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 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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* CRM 상담
|
||||
* @author 추지훈
|
||||
* @since 2024-02-19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-19 추지훈. 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/crm/cnslt")
|
||||
@Slf4j
|
||||
public class ItrntCrmCnsltController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
/**
|
||||
* CRM 상담 내역 폼 이동
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCnsltDtlsForm")
|
||||
public String selectCnsltDtlsForm(CrmCnsltVO cnsltVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOCnsltDtlsForm", cnsltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("cnsltVO", cnsltVO);
|
||||
|
||||
return "itrnt/crm/cnslt/ItrntCnsltDtlsRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 상담 내역 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCnsltDtlsInqire")
|
||||
public String selectCnsltDtlsInqire(CrmCnsltVO cnsltVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOCnsltDtls", cnsltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/cnslt/ItrntCnsltDtlsR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 상담 등록 폼 이동
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCnsltRegistPopupForm")
|
||||
public String selectCnsltRegistPopupForm(CrmCnsltVO cnsltVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOCnsltRegistPopupForm", cnsltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
model.addAttribute("cnsltVO", cnsltVO);
|
||||
|
||||
return "itrnt/crm/cnslt/ItrntCnsltRegistPopupC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 상담 등록
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertCnsltRegist")
|
||||
public ResponseEntity<WnbtResponse> insertCnsltRegist(@Validated CrmCnsltVO cnsltVO,BindingResult bindingResult) {
|
||||
log.debug("cnsltVO is {}", cnsltVO);
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
log.debug("bindingResult {}",bindingResult);
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/insertBOCnsltRegist", cnsltVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 상담 상세 수정 팝업 폼
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCnsltDtlUpdtInqirePopup")
|
||||
public String selectCnsltDtlUpdtInqirePopup(CrmCnsltVO cnsltVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOCnsltDtlUpdtInqirePopup", cnsltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/cnslt/ItrntCnsltDtlUpdtPopupU";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 상담 수정
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateCnsltUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateCstmrCnsltUpdt(@Validated CrmCnsltVO cnsltVO, BindingResult bindingResult) {
|
||||
log.debug("cnsltVO is {}", cnsltVO);
|
||||
// 정합성 검사
|
||||
if(bindingResult.hasErrors()){
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/updateBOCnsltUpdt", cnsltVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 상담 삭제
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteCnsltDel")
|
||||
public ResponseEntity<WnbtResponse> deleteCnsltDel(CrmCnsltVO cnsltVO) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/deleteBOCnsltDel", cnsltVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.cnslt.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* 관리자 - 상담 VO
|
||||
* @author 추지훈
|
||||
* @since 2024-01-26
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-01-26 추지훈. 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CrmCnsltVO extends AbstractVO{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 매장 상담 컬럼
|
||||
*/
|
||||
/**매장상담내역 고유번호(PK)*/
|
||||
private String strCnsltDtlsInnb;
|
||||
/**매장 고유번호(FK)*/
|
||||
private String strInnb;
|
||||
/**관리자 고유번호*/
|
||||
private String mngrInnb;
|
||||
/**회원고유번호*/
|
||||
private String mbrInnb;
|
||||
/**회원구분코드*/
|
||||
private String mbrDvCd;
|
||||
/**상담내용*/
|
||||
@NotBlank(message = "상담내용")
|
||||
private String cnsltCn;
|
||||
/**처리상태*/
|
||||
private String procsSttus;
|
||||
/**처리일시*/
|
||||
private String procsDt;
|
||||
/*작성자이름*/
|
||||
private String regusrnm;
|
||||
/**
|
||||
* 검색
|
||||
*/
|
||||
|
||||
/** 검색_검색어 구분 */
|
||||
private String srchKeywordDv;
|
||||
/** 검색_검색어 */
|
||||
private String srchKeyword;
|
||||
/** 검색_등록일 구분 */
|
||||
private String srchDtDv;
|
||||
/** 검색_시작일 */
|
||||
private String srchStartDate;
|
||||
/** 검색_종료일 */
|
||||
private String srchEndDate;
|
||||
/** 검색_상담자 */
|
||||
private String srchMngrNm;
|
||||
/** 검색_처리 여부 */
|
||||
private String[] srchProcsSttusCd;
|
||||
/** 검색_상담내용 */
|
||||
private String srchCnsltCn;
|
||||
|
||||
/*공통*/
|
||||
/*휴대폰번호*/
|
||||
private String mbtlnb;
|
||||
private String sopmalCd;
|
||||
//본사이지 매장인지
|
||||
private String tentGroup;
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.coupon.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.crm.cnslt.vo.CrmCnsltVO;
|
||||
import com.wb.domainserver.domain.itrnt.crm.coupon.vo.CrmCouponVO;
|
||||
import com.wb.domainserver.domain.mngr.promtn.coupon.vo.DwldCouponVO;
|
||||
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.SendToResrc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
*
|
||||
* CRM 쿠폰
|
||||
* @author 추지훈
|
||||
* @since 2024-02-19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-19 추지훈. 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/crm/coupon")
|
||||
@Slf4j
|
||||
public class ItrntCrmCouponController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰내역 목록 폼 이동
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectHoldCouponDtlsForm")
|
||||
public String selectHoldCouponDtlsForm(CrmCnsltVO vo, CrmCouponVO couponVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/promtn/coupon/selectBOHoldCouponDtlsForm", couponVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("cnsltVO",vo);
|
||||
return "itrnt/crm/coupon/ItrntHoldCouponDtlsRForm";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰내역 목록 조회 ( 사용 가능 쿠폰 내역 )
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectHoldCouponDtlsInqire")
|
||||
public String selectHoldCouponDtlsInqire(CrmCouponVO couponVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/promtn/coupon/selectBOCouponUsePosblDtlsInqire", couponVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/coupon/ItrntHoldCouponDtlsR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 쿠폰 상세 팝업
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntHoldCouponDtlPopupForm")
|
||||
public String selectItrntHoldCouponDtlPopupForm(com.wb.domainserver.domain.crm.coupon.vo.CrmCouponVO couponVO, ModelMap model) {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/promtn/coupon/selectBOCouponInfoInqirePopup", couponVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/coupon/ItrntHoldCouponDtlPopupR";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰내역 목록 조회 ( 다운로드 가능 쿠폰 내역 )
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectDwldPosblCouponDtlsInqire")
|
||||
public String selectDwldPosblCouponDtlsInqire(CrmCouponVO couponVO, ModelMap model) {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/promtn/coupon/selectBODwldCouponDtlsInqire", couponVO),
|
||||
model,
|
||||
"resultMapDwld"
|
||||
);
|
||||
|
||||
return "itrnt/crm/coupon/ItrntDwldPosblCouponDtlsR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 쿠폰 정보 조회 팝업 : 다운로드 된 쿠폰 ( 사용 가능 쿠폰, 사용한 쿠폰, 주문 사용 쿠폰 )
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectDwldYCouponInfoInqirePopup")
|
||||
public String selectDwldYCouponInfoInqirePopup(DwldCouponVO dwldCouponVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/promtn/coupon/selectBODwldYCouponInfoInqirePopup", dwldCouponVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/coupon/ItrntCouponInfoInqirePopupR";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.coupon.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 해당 클래스에 대한 설명을 입력하세요.
|
||||
* @author 추지훈
|
||||
* @since 2024-02-27
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-27 추지훈 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CrmCouponVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 쿠폰정보
|
||||
*/
|
||||
|
||||
/** 다운로드 쿠폰 고유번호 */
|
||||
private Integer dwldCouponInnb;
|
||||
/** 쿠폰 고유번호 */
|
||||
private Integer couponInnb;
|
||||
/** 회원 고유번호 */
|
||||
private Integer mbrInnb;
|
||||
/** 회원 구분 코드 */
|
||||
private String mbrDvCd;
|
||||
/** 쿠폰팩 고유번호 */
|
||||
private Integer cupnpkInnb;
|
||||
/** 오프라인쿠폰 고유번호 */
|
||||
private Integer oflneCouponInnb;
|
||||
|
||||
/** 쿠폰 발송 고유번호 */
|
||||
private Integer couponSndngInnb;
|
||||
/** 쿠폰 발송 유형코드 */
|
||||
private String couponSndngTy;
|
||||
/** 발송구분 */
|
||||
private String sndngDv;
|
||||
/** 발송대상 구분 */
|
||||
private String sndngTrgetDv;
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
/** 다운로드 쿠폰팩명 */
|
||||
private String cupnpkNm;
|
||||
/** 다운로드 쿠폰팩 설명 */
|
||||
private String cupnpkDc;
|
||||
/** 다운로드 쿠폰명 */
|
||||
private String coupNm;
|
||||
/** 다운로드 쿠폰 설명 */
|
||||
private String couponDc;
|
||||
/** 사용환경코드 */
|
||||
private String useEnvrnCd;
|
||||
/** 단독사용, 공동사용 */
|
||||
private String otrCouponSmtmUseAt;
|
||||
/** 중복다운로드여부 */
|
||||
private String dplctDwldAt;
|
||||
/** 중복할인여부 */
|
||||
private String dplctDscntAt;
|
||||
/** 사용가능금액 */
|
||||
private String usePosblAmt;
|
||||
/** 상품카테고리 제한구분( 전체상품(all), 상품/카테고리(issue) ) */
|
||||
private String goodsCtgryLmttDv;
|
||||
/** 유효기간시작일시 */
|
||||
private String validpdBgnDt;
|
||||
/** 유효기간시작일시 포맷 yyyy-mm-dd */
|
||||
private String validpdBgnDe;
|
||||
/** 유효기간종료일시 */
|
||||
private String validpdEndDt;
|
||||
/** 유효기간종료일시 포맷 yyyy-mm-dd */
|
||||
private String validpdEndDe;
|
||||
/** 유효기간 남은 일수 */
|
||||
private String validpdDay;
|
||||
/** 쿠폰 사용여부 */
|
||||
private String couponUseAt;
|
||||
/** 쿠폰 사용 일시 */
|
||||
private String couponUseDt;
|
||||
/** 오프라인쿠폰 인증번호 */
|
||||
private String oflneCouponCrtnb;
|
||||
/** 사용처구분 */
|
||||
private String useplcDv;
|
||||
/** 복원 원본쿠폰 */
|
||||
private String recovryOrginlCoupon;
|
||||
|
||||
|
||||
|
||||
// 쿠폰 혜택
|
||||
|
||||
/** 다운로드 쿠폰 혜택 고유번호 */
|
||||
private Integer dwldCouponBnefInnb;
|
||||
/** 혜택구분 */
|
||||
private String bnefDv;
|
||||
/** 상품할인구분 */
|
||||
private String goodsDscntDv;
|
||||
/** 추가할인금액 */
|
||||
private String aditDscntAmt;
|
||||
/** 추가할인비율 */
|
||||
private String aditDscntRt;
|
||||
/** 할인최대금액 */
|
||||
private String dscntMxmmAmt;
|
||||
/** 무료, 금액 */
|
||||
private String dlvyAmtDscntDv;
|
||||
/** 배송비할인금액 */
|
||||
private String dlvyAmtDscntAmt;
|
||||
/** 배송비최대할인금액 */
|
||||
private String dlvyAmtMxmmDscntAmt;
|
||||
|
||||
|
||||
|
||||
// 쿠폰 적용 상품
|
||||
|
||||
/** 쿠폰 적용상품 고유번호 */
|
||||
private Integer dwldCouponApplcGoodsInnb;
|
||||
/** 상품적용구분 */
|
||||
private String goodsApplcDv;
|
||||
/** 판매상품 고유번호 */
|
||||
private Integer sleGoodsInnb;
|
||||
/** 혜택 적용 판매상품 고유번호 리스트 */
|
||||
private List<Integer> sleGoodsInnbList;
|
||||
/** 혜택 제외 판매상품 고유번호 리스트 */
|
||||
private List<Integer> ExclSleGoodsInnbList;
|
||||
/** 카테고리 ID */
|
||||
private Integer ctgryId;
|
||||
/** 혜택 적용 카테고리 ID 리스트 */
|
||||
private List<Integer> ctgryIdList;
|
||||
/** 혜택 제외 카테고리 ID 리스트 */
|
||||
private List<Integer> ExclCtgryIdList;
|
||||
|
||||
// 검색조건
|
||||
|
||||
/** 검색_회원아이디, 회원명 */
|
||||
private String searchKeyword;
|
||||
/** 검색_발급일 시작 */
|
||||
private String srchStartDate;
|
||||
/** 검색_발급일 종료 */
|
||||
private String srchEndDate;
|
||||
/** 검색_다운로드쿠폰사용여부 */
|
||||
private String srchUseAt;
|
||||
|
||||
|
||||
/** 쿠폰 발급 혹은 쿠폰 등록 시 */
|
||||
private String[] couponArray;
|
||||
|
||||
|
||||
/** 그룹 코드 */
|
||||
private String groupCd;
|
||||
|
||||
/** 주문 고유번호 ( 주문 쿠폰 사용 내역 조회 ) */
|
||||
private String ordrInnb;
|
||||
|
||||
/** JSON 형태의 회원 리스트 ( 발급하기 ) */
|
||||
private String jsonMbrList;
|
||||
|
||||
|
||||
/**
|
||||
* 서버 구분
|
||||
*/
|
||||
private String serverDv;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.mbr.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.crm.cnslt.vo.CrmCnsltVO;
|
||||
import com.wb.domainserver.domain.itrnt.crm.mbr.vo.CrmMbrVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.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.string.StringUtil;
|
||||
import com.wb.domainserver.util.util.Util;
|
||||
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;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/crm/mbr")
|
||||
public class ItrntCrmMbrController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/**
|
||||
* CRM 회원 정보 조회
|
||||
*
|
||||
* @param paramVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMbrCrmInfo")
|
||||
public ResponseEntity<WnbtResponse> selectMbrCrmInfo(CrmMbrVO mbrVO) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrCrmInfoPopupInqire", mbrVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 회원 정보 수정 팝업 이동
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMbrInfoUpdtInqire")
|
||||
public String selectMbrInfoUpdtInqire(CrmCnsltVO vo, CrmMbrVO mbrVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOCstmrInfoInqire", mbrVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setTentGroup(user.getTentGroup());
|
||||
model.addAttribute("cnsltVO",vo);
|
||||
return "itrnt/crm/mbr/ItrntMbrInfoUpdtU";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 회원 정보 수정
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateMbrInfoUpdt", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateMbrInfoUpdt(@Validated CrmMbrVO mbrVO, HttpServletRequest request, HttpSession session, BindingResult bindingResult) {
|
||||
log.debug("mbrVO is {}", mbrVO);
|
||||
// 정합성 검사
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
//등록 아이피 set
|
||||
String ip = (String) Util.getRequestInfo(request).get("XForwardedFor");
|
||||
mbrVO.setRegistIp(ip);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/updateBOMbrInfoUpdtItrnt", mbrVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 CRM 팝업 폼 ( 아이디 클릭시 바로 옆에 띄워지는 고객 CRM 팝업 화면 )
|
||||
*
|
||||
* @param paramVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMbrCrmInfoPopupForm")
|
||||
public String selectMbrCrmInfoPopupForm(CrmMbrVO mbrVO, ModelMap model) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
mbrVO.setTentGroup(user.getTentGroup());
|
||||
mbrVO.setSopmalCd(user.getReprsntBrand());
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrCrmInfoPopupInqire", mbrVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("cnsltVO", mbrVO);
|
||||
return "itrnt/crm/mbr/ItrntMbrCrmInfoPopupR";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* CRM 회원 정보 조회 이동
|
||||
*
|
||||
* @param paramVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCstmrInfoInqire")
|
||||
public String selectCstmrInfoInqire(CrmCnsltVO vo,CrmMbrVO mbrVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOCstmrInfoInqire", mbrVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
model.addAttribute("cnsltVO",vo);
|
||||
return "itrnt/crm/mbr/ItrntCstmrInfoInqireR";
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 회원 정보 조회 > 관리매장 변경 팝업
|
||||
*
|
||||
* @param paramVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectManageStrChngPopupForm")
|
||||
public String selectManageStrChngPopupForm(CrmMbrVO mbrVO, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOManageStrChngPopupForm", mbrVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/crm/mbr/ItrntManageStrChngPopupU";
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 회원 정보 조회 > 관리매장 수정
|
||||
*
|
||||
* @param paramVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateManageStrUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateManageStrUpdt(HttpServletRequest request, CrmMbrVO mbrVO) { //등록 ip 설정
|
||||
String ip = (String) Util.getRequestInfo(request).get("XForwardedFor");
|
||||
log.debug("ip {}", ip);
|
||||
mbrVO.setRegistIp(ip);
|
||||
//관리매장 없을시 set
|
||||
if(StringUtil.isEmpty(mbrVO.getBeforeStrNm())){
|
||||
mbrVO.setBeforeStrNm("관리매장 없음");
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOManageStrUpdt", mbrVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 해당 회원 crm 정보 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCrmMbrInfo")
|
||||
public ResponseEntity<WnbtResponse> selectCrmMbrInfo(CrmMbrVO vo, HttpSession session) {
|
||||
log.debug("vo =>{}", vo);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
/*검색어에 해당하는 회원 조회*/
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOCrmMenuMbrInfoInqire", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 휴대폰 인증번호 생성
|
||||
* @return
|
||||
* @author 이대환
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/insertPhoneAuth")
|
||||
public ResponseEntity<WnbtResponse> insertPhoneAuth(CrmMbrVO vo){
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/insertBOPhoneAuth", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴대폰 인증
|
||||
* @return
|
||||
* @author 이대환
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectPhoneAuth")
|
||||
public ResponseEntity<WnbtResponse> selectPhoneAuth(CrmMbrVO vo){
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOPhoneAuth", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.mbr.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* 해당 클래스에 대한 설명을 입력하세요.
|
||||
* @author 추지훈
|
||||
* @since 2024-02-27
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-27 추지훈. 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CrmMbrVO extends AbstractVO{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
// 회원 정보
|
||||
|
||||
/**회원 고유번호 배열*/
|
||||
private String[] mbrarr;
|
||||
|
||||
/**회원고유번호*/
|
||||
private String mbrInnb;
|
||||
|
||||
/**회원 구분 코드*/
|
||||
private String mbrDvCd;
|
||||
/**회원등급 고유번호*/
|
||||
private String mbrGradInnb;
|
||||
/**이전 회원등급 고유번호*/
|
||||
private String beforeMbrGradInnb;
|
||||
|
||||
/**유입경로번호*/
|
||||
private String inflowCoursNb;
|
||||
|
||||
/**가입환경코드*/
|
||||
private String sbscrbEnvrnCd;
|
||||
/**회원유형코드*/
|
||||
private String mbrTyCd;
|
||||
|
||||
/**회원id*/
|
||||
private String mbrId;
|
||||
/*id 변경 여부*/
|
||||
private String mbrIdChngAt;
|
||||
|
||||
/**회원비밀번호*/
|
||||
private String mbrPassword;
|
||||
|
||||
/**비밀번호변경일자*/
|
||||
private String passwordChngDe;
|
||||
|
||||
/** 비밀번호변경 여부 */
|
||||
private String mbrPwdChngAt;
|
||||
|
||||
|
||||
/**회원명*/
|
||||
private String mbrNm;
|
||||
|
||||
/**이메일*/
|
||||
private String email;
|
||||
|
||||
|
||||
/**휴대폰번호*/
|
||||
private String mbtlnb;
|
||||
|
||||
/**전화번호*/
|
||||
private String telnb;
|
||||
|
||||
/**우편번호*/
|
||||
private String zip;
|
||||
|
||||
/**도로명, 지번*/
|
||||
private String adresDv;
|
||||
|
||||
/**지번주소*/
|
||||
private String lnbAdres;
|
||||
|
||||
/**도로명주소*/
|
||||
private String rnmAdres;
|
||||
|
||||
/**주소*/
|
||||
private String adres;
|
||||
|
||||
/**상세주소*/
|
||||
private String dtlAdres;
|
||||
|
||||
/**성별*/
|
||||
private String sex;
|
||||
|
||||
/**일자는 01로 입력*/
|
||||
private String brthDe;
|
||||
|
||||
/**상태*/
|
||||
private String sttus;
|
||||
|
||||
/**통합서비스정보제공동의*/
|
||||
private String unitySvcCnsOffrInfo;
|
||||
|
||||
/**년도*/
|
||||
private String indvdlInfoValidPd;
|
||||
|
||||
/**광고수신동의변경일시*/
|
||||
private String advrtsRecptnAgreUpdtDt;
|
||||
|
||||
/**광고수신동의전송일시*/
|
||||
private String advrtsRecptnAgreTrnsmisDt;
|
||||
/**gcone 가입여부*/
|
||||
private String gconeSbscrbAt;
|
||||
|
||||
/** 관리자메모 */
|
||||
private String mngrMemo;
|
||||
/** 관리자로그 */
|
||||
private String mngrLog;
|
||||
/** 등록자 IP */
|
||||
private String registIp;
|
||||
|
||||
/** 주문번호 */
|
||||
private String ordrInnb;
|
||||
|
||||
// 외부연동 회원 ( kakao, naver, pos )
|
||||
|
||||
/** 외부연동순번 */
|
||||
private Integer extrlIntrlckSnb;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 외부연동구분코드 */
|
||||
private String extrlIntrlckDvCd;
|
||||
/** 외부연동ID */
|
||||
private String extrlIntrlckId;
|
||||
/** 가입구분코드 */
|
||||
private String sbscrbDvCd;
|
||||
|
||||
/** 약정코드 */
|
||||
private String stplatDvCds;
|
||||
|
||||
/** 약정코드 동의여부*/
|
||||
private String stplatDvCdAts;
|
||||
|
||||
/** gc_marketing_agree */
|
||||
/** 마케팅 발신 동의 여부 */
|
||||
private String marktRecptnAgreAt;
|
||||
/** 마케팅 발신 동의 여부 */
|
||||
private String beforeMarktRecptnAgreAt;
|
||||
|
||||
/** 마케팅 발신 수신 동의 여부 수정일 */
|
||||
private String marktRecptnAgreUpdtDt;
|
||||
|
||||
/** fm_member_login */
|
||||
/** 약정코드 */
|
||||
private String conectLogInnb;
|
||||
|
||||
/** 약정코드 */
|
||||
private String conectEnvrn;
|
||||
|
||||
/** 약정코드 */
|
||||
private String conectIp;
|
||||
|
||||
/** 약정코드 */
|
||||
private String loginTy;
|
||||
|
||||
|
||||
/** fm_clause_agre */
|
||||
/** 약정코드 */
|
||||
private String stplatAgreInnb;
|
||||
|
||||
/** 약정코드 */
|
||||
private String stplatInnb;
|
||||
|
||||
|
||||
/** fm_marketing_agree_log */
|
||||
/** 약정코드 */
|
||||
private String advrtsRecptnAgreChngInnb;
|
||||
|
||||
/** fm_delivery_address */
|
||||
/** 약정코드 */
|
||||
private String adbkInnb;
|
||||
|
||||
/** 약정코드 */
|
||||
private String dlvylcDcCn;
|
||||
|
||||
/** 약정코드 */
|
||||
private String recpntNm;
|
||||
|
||||
/** 약정코드 */
|
||||
private String dftDlvylcAt;
|
||||
|
||||
/** 약정코드 */
|
||||
private String recentDlvylcAt;
|
||||
|
||||
|
||||
/** fm_extrl_member */
|
||||
/** 약정코드 */
|
||||
private String emailAdres;
|
||||
|
||||
/** 약정코드 */
|
||||
private String sexdstnCd;
|
||||
|
||||
|
||||
|
||||
|
||||
/** 관리자 확인 비밀번호 */
|
||||
private String password;
|
||||
|
||||
|
||||
|
||||
// 회원 탈퇴 fm_member_withdrawal
|
||||
|
||||
|
||||
/**탈퇴사유*/
|
||||
private String secsnResn;
|
||||
/**메모*/
|
||||
private String memo;
|
||||
/** 회원 탈퇴 고유번호 */
|
||||
private Integer withdrawalMbrInnb;
|
||||
|
||||
|
||||
|
||||
// 관리 매장 변경
|
||||
|
||||
/** 기존 관리 매장명 */
|
||||
private String beforeStrNm;
|
||||
/** 변결 매장명 */
|
||||
private String strNm;
|
||||
/** 매장 고유번호 */
|
||||
private Integer strInnb;
|
||||
/*포스매장고유번호*/
|
||||
private String posStrInnb;
|
||||
/*페이지구분*/
|
||||
private String pageDv;
|
||||
/*입점사구분*/
|
||||
private String tentGroup;
|
||||
|
||||
/*인증번호*/
|
||||
/*인증고유번호*/
|
||||
private String sndngInnb;
|
||||
/*인증확인번호*/
|
||||
private String crtnb;
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.mlg.controller;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.crm.cnslt.vo.CrmCnsltVO;
|
||||
import com.wb.domainserver.domain.itrnt.crm.mlg.vo.CrmMlgVO;
|
||||
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.SendToResrc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
|
||||
/**
|
||||
* CRM 마일리지 내역
|
||||
*
|
||||
* @author 추지훈
|
||||
* @version 1.0
|
||||
* @see <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-19 추지훈. 최초 생성
|
||||
* 2024-05-20 이운산 수정
|
||||
*
|
||||
* </pre>
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/crm/mlg")
|
||||
public class ItrntCrmMlgController {
|
||||
|
||||
/**
|
||||
* WebClient 호출을 위한 wrapper
|
||||
*/
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
|
||||
/**
|
||||
* 마일리지 내역 폼 이동
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMlgDtlsForm")
|
||||
public String selectMlgDtlsForm(CrmCnsltVO cnsltVO, CrmMlgVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mlg/selectBOMlgManagePopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("cnsltVO", cnsltVO);
|
||||
return "itrnt/crm/mlg/ItrntMlgDtlsRForm";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 마일리지 내역 조회
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMlgDtlsInqire")
|
||||
public String selectMlgDtlsInqire(CrmMlgVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mlg/selectBOMlgListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/mlg/ItrntMlgDtlsR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 충전형 마일리지 내역 폼 이동
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCashDtlsForm")
|
||||
public String selectCashDtlsForm(CrmCnsltVO cnsltVO, CrmMlgVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mlg/selectBOMlgManagePopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("cnsltVO", cnsltVO);
|
||||
return "itrnt/crm/mlg/ItrntCashDtlsRForm";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 충전형 마일리지 내역 조회
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectCashDtlsInqire")
|
||||
public String selectCashDtlsInqire(CrmMlgVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mlg/selectBOCashList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/mlg/ItrntCashDtlsR";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.mlg.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CrmMlgVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 마일리지 정보
|
||||
*/
|
||||
/** 마일리지 고유번호 */
|
||||
private Integer mlgInnb;
|
||||
/** 주문고유번호 */
|
||||
private Integer ordrInnb;
|
||||
/** 회원고유번호 */
|
||||
private Integer mbrInnb;
|
||||
/** 회원구분코드 */
|
||||
private String mbrDvCd;
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
/** 게시글고유번호 */
|
||||
private Integer bbscttInnb;
|
||||
/** 주문코드 */
|
||||
private String ordrCd;
|
||||
/** 마일리지구분 */
|
||||
private String mlgDvCd;
|
||||
/** 마일리지적립구분 */
|
||||
private String mlgAccmlDvCd;
|
||||
/** 마일리지적용구분 */
|
||||
/** 적립(지급) : 리뷰(일반,포토,한달),구매,이벤트, 관리자 사용(차감, 소멸) : 구매, 관리자, 기간만료 */
|
||||
private String mlgApplcDvCd;
|
||||
/** 마일리지적용사유 */
|
||||
private String mlgApplcResn;
|
||||
/** 적립금액 */
|
||||
private BigDecimal accmlmnyAmt;
|
||||
/** 잔액 */
|
||||
private BigDecimal blce;
|
||||
/** 손실 */
|
||||
private BigDecimal loss;
|
||||
/** 사용가능시작일시 */
|
||||
private Date usePosblBgnDt;
|
||||
/** 사용가능종료일시 */
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX")
|
||||
private Date usePosblEndDt;
|
||||
/** 주문정보 */
|
||||
private String ordrInfo;
|
||||
/** 관리코드 */
|
||||
private String manageCd;
|
||||
/** 관리메모 */
|
||||
private String manageMemo;
|
||||
/** 만료여부 */
|
||||
private String endAt;
|
||||
/** 취소여부 */
|
||||
private String canclAt;
|
||||
/** 취소일시 */
|
||||
private Date canclDt;
|
||||
/** 소멸 배치 묶음 */
|
||||
private String extshBatchBundle;
|
||||
/** 온오프 구분 */
|
||||
private String onlineOflneDvCd;
|
||||
/** 매장고뷰번호 */
|
||||
private Integer strInnb;
|
||||
/** 매장코드 */
|
||||
private String strCd;
|
||||
/** 매장명 */
|
||||
private Integer strnm;
|
||||
/** 매장구분 */
|
||||
private String strDvCd;
|
||||
/** 포스코드 */
|
||||
private String posCd;
|
||||
/** 등록자구분 */
|
||||
private String regusrDvCd;
|
||||
/** 수정자구분 */
|
||||
private String updusrDvCd;
|
||||
/** 마일리지 유효기간 */
|
||||
private Integer mlgValidPd;
|
||||
/** 마일리지 유효기간 설정 여부 */
|
||||
private String mlgValidPdAt;
|
||||
|
||||
/** 마일리지 유효기간 설정 여부*/
|
||||
private String validAt;
|
||||
|
||||
// 검색
|
||||
/** 검색_마일리지 적립 구분코드 */
|
||||
private String srchMlgAccmlDvCd;
|
||||
/** 검색_브랜드명 */
|
||||
private String srchSopmalCd;
|
||||
/** 검색_시작날짜 */
|
||||
private String srchStartDate;
|
||||
/** 검색_종료날짜 */
|
||||
private String srchEndDate;
|
||||
/** 검색_마일리지 적립 구분 */
|
||||
private List<String> srchMlgAccmlDv;
|
||||
|
||||
/** 유효기간 수정_종료일자 */
|
||||
private String usePosblEndDtStr;
|
||||
|
||||
/** 문자 입력 내용 */
|
||||
private String mlgSmsCn;
|
||||
/** 문자 발송 전화번호 */
|
||||
private String mbtlnb;
|
||||
/** 문자 발송 고객명 */
|
||||
private String mbrNm;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.mlg.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* 마일리지 VO
|
||||
* @author 추지훈
|
||||
* @since 2024-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-05 추지훈 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class MlgVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 마일리지 정보
|
||||
*/
|
||||
/** 마일리지 고유번호 */
|
||||
private BigInteger mlgInnb;
|
||||
/** 주문고유번호 */
|
||||
private BigInteger ordrInnb;
|
||||
/** 회원고유번호 */
|
||||
private Integer mbrInnb;
|
||||
/** 회원구분코드 */
|
||||
private String mbrDvCd;
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
/** 게시글고유번호 */
|
||||
private Integer bbscttInnb;
|
||||
/** 주문코드 */
|
||||
private String ordrCd;
|
||||
/** 마일리지구분 */
|
||||
private String mlgDvCd;
|
||||
/** 마일리지적립구분 */
|
||||
private String mlgAccmlDvCd;
|
||||
/** 마일리지적용구분 */
|
||||
/** 적립(지급) : 리뷰(일반,포토,한달),구매,이벤트, 관리자 사용(차감, 소멸) : 구매, 관리자, 기간만료 */
|
||||
private String mlgApplcDvCd;
|
||||
/** 마일리지적용사유 */
|
||||
private String mlgApplcResn;
|
||||
/** 적립금액 */
|
||||
private BigDecimal accmlmnyAmt;
|
||||
/** 잔액 */
|
||||
private BigDecimal blce;
|
||||
/** 손실 */
|
||||
private BigDecimal loss;
|
||||
/** 사용가능시작일시 */
|
||||
private Date usePosblBgnDt;
|
||||
/** 사용가능종료일시 */
|
||||
private Date usePosblEndDt;
|
||||
/** 주문정보 */
|
||||
private String ordrInfo;
|
||||
/** 관리코드 */
|
||||
private String manageCd;
|
||||
/** 관리메모 */
|
||||
private String manageMemo;
|
||||
/** 만료여부 */
|
||||
private String endAt;
|
||||
/** 취소여부 */
|
||||
private String canclAt;
|
||||
/** 취소일시 */
|
||||
private Date canclDt;
|
||||
/** 소멸 배치 묶음 */
|
||||
private String extshBatchBundle;
|
||||
/** 온오프 구분 */
|
||||
private String onlineOflneDvCd;
|
||||
/** 매장고뷰번호 */
|
||||
private Integer strInnb;
|
||||
/** 매장코드 */
|
||||
private String strCd;
|
||||
/** 매장명 */
|
||||
private String strnm;
|
||||
/** 매장구분 */
|
||||
private String strDvCd;
|
||||
/** 포스코드 */
|
||||
private String posCd;
|
||||
/** 등록자구분 */
|
||||
private String regusrDvCd;
|
||||
/** 수정자구분 */
|
||||
private String updusrDvCd;
|
||||
|
||||
/**
|
||||
* db 없는 항목
|
||||
*/
|
||||
|
||||
/** 마일리지 유효기간 */
|
||||
private Integer mlgValidDt;
|
||||
|
||||
/** 사용쇼핑몰 코드 */
|
||||
private String useSopmalCd;
|
||||
|
||||
/** 마일리지 유효기간 설정 여부*/
|
||||
private String validAt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.mlg.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 마일리지 VO
|
||||
* @author 추지훈
|
||||
* @since 2024-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-05-21 이운산 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PosReqVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 포스 요청 정보
|
||||
*/
|
||||
/** 매장 코드 */
|
||||
private String storecode;
|
||||
/** 포스 코드 */
|
||||
private String poscode;
|
||||
/** cmd */
|
||||
private String cmd;
|
||||
/**회원 아이디 */
|
||||
private String uid;
|
||||
/**매출 코드 */
|
||||
private String ocode;
|
||||
/**실 결제 금액 (할인 금액 및 사용 마일리지 제외) */
|
||||
private Integer amt;
|
||||
/**프로모션 추가적립금액 */
|
||||
private Integer promsaveamt;
|
||||
/**구매한 상품정보 추가*/
|
||||
private List<HashMap<String, Object>> detail_arr;
|
||||
/** search_item (string) : uid(아이디), username(이름), cp(휴대폰 번호) */
|
||||
private String searchItem;
|
||||
/** 검색어 */
|
||||
private String searchKey;
|
||||
/** 나눌 갯수 */
|
||||
private Integer limit;
|
||||
/** 시작 위치 */
|
||||
private Integer offset;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.ordr.controller;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.crm.cnslt.vo.CrmCnsltVO;
|
||||
import com.wb.domainserver.domain.itrnt.crm.ordr.vo.CrmOrdrVO;
|
||||
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.SendToResrc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/crm/ordr")
|
||||
@Slf4j
|
||||
public class ItrntCrmOrdrController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/**
|
||||
* 회원 주문 조회 폼
|
||||
* @param ordrSrchVO
|
||||
* @param model
|
||||
* @return MbrOrdrListInqireRForms.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMbrOrdrListInqireForm")
|
||||
public String selectMbrOrdrListInqireForm(CrmCnsltVO vo , ModelMap model , CrmOrdrVO ordrSrchVO) {
|
||||
log.debug("selectMbrOrdrListInqireForm(ordrSrchVO = {})", ordrSrchVO);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ordr/ordr/selectBOAllOrdrListInqire", ordrSrchVO),
|
||||
model,
|
||||
"cond"
|
||||
);
|
||||
model.addAttribute("cnsltVO",vo);
|
||||
model.addAttribute("ordrSrchVO",ordrSrchVO);
|
||||
return "itrnt/crm/ordr/ItrntMbrOrdrListInqireRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 주문 조회
|
||||
* @param ordrSrchVO
|
||||
* @param model
|
||||
* @return ItrntMbrOrdrListInqireR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMbrOrdrListInqire")
|
||||
public String selectMbrOrdrListInqire(ModelMap model , CrmOrdrVO ordrSrchVO) {
|
||||
log.debug("selectMbrOrdrListInqire(ordrSrchVO = {})", ordrSrchVO);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ordr/ordr/selectAllOrdrListInqireAjax", ordrSrchVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/crm/ordr/ItrntMbrOrdrListInqireR";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.wb.domainserver.domain.itrnt.crm.ordr.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 CrmOrdrVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/** 주소록 고유번호 */
|
||||
private int adbkInnb;
|
||||
/** 회원 고유번호 */
|
||||
@NotBlank
|
||||
private int mbrInnb;
|
||||
/** 배송지설명내용 */
|
||||
//private String dlvylcDcCn;
|
||||
/** 받는사람명 */
|
||||
@NotBlank(message = "받는사람명")
|
||||
private String recpntNm;
|
||||
/** 전화번호 */
|
||||
//private String telnb;
|
||||
/** 휴대폰번호 */
|
||||
@NotBlank(message = "휴대폰번호")
|
||||
private String mbtlnb;
|
||||
/** 우편번호 */
|
||||
@NotBlank(message = "우편번호")
|
||||
private String zip;
|
||||
/** 도로명,지번 구분 */
|
||||
private String adresDv;
|
||||
/** 지번주소 */
|
||||
private String lnbAdres = "";
|
||||
/** 도로명주소 */
|
||||
private String rnmAdres = "";
|
||||
/** 상세주소 */
|
||||
@NotBlank(message = "상세주소")
|
||||
private String dtlAdres;
|
||||
/** 지번주소 */
|
||||
private String dftDlvylcAt;
|
||||
/** 기본배송지여부 */
|
||||
private String recentDlvylcAt;
|
||||
/*쇼핑몰코드*/
|
||||
private String sopmalCd;
|
||||
/**검색 목록*/
|
||||
private String srchList;
|
||||
|
||||
/**검색어*/
|
||||
private String srchwrd;
|
||||
|
||||
/**날짜 검색 목록*/
|
||||
private String srchDate;
|
||||
|
||||
/**검색 시작일*/
|
||||
@NotBlank(message = "시작일")
|
||||
private String srchStartDate;
|
||||
|
||||
/**검색 종료일*/
|
||||
@NotBlank(message = "종료일")
|
||||
private String srchEndDate;
|
||||
|
||||
/** 주문상태코드
|
||||
* 주문접수(15), 결제확인(25), 상품준비(35),
|
||||
* 배송중(65), 배송완료(75),
|
||||
* 결제취소(85), 주문무효(95), 결제실패(99) */
|
||||
private String[] srchOrdrSttusCds;
|
||||
/*
|
||||
####################################
|
||||
전체 주문 조회 검색 추가 조건 시작
|
||||
####################################
|
||||
*/
|
||||
private String srchwrdDv; // 검색어 구분
|
||||
|
||||
private String srchStrInnb; // 매장 고유번호
|
||||
|
||||
private String srchDateDv; // 일자구분
|
||||
|
||||
private String srchImprtncOrdr; // 중요여부(중요)
|
||||
|
||||
private String srchNonImprtncOrdr; // 중요여부(비중요)
|
||||
|
||||
private String[] srchOrdrEnvrnCds; // 주문환경 코드
|
||||
|
||||
private String srchResveSndngDvCd; // 예약배송구분
|
||||
|
||||
private String srchHopDlvyStartDate; // 희망배송일 시작일자
|
||||
|
||||
private String srchHopDlvyEndDate; // 희망배송일 종료일자
|
||||
|
||||
private String[] srchDlvyMthCds; // 배송방법 코드
|
||||
|
||||
private String[] srchOrdrTyCds; // 주문유형 코드
|
||||
|
||||
private String[] srchPgCmpnyCds; // 결제사 코드
|
||||
|
||||
private String[] setleMthCds; // 결제유형 코드
|
||||
|
||||
private String srchMemorSetleAt; // 수기결제여부
|
||||
|
||||
private long srchExcelDwldFormSnb; // 엑셀다운로드양식순번
|
||||
|
||||
private String srchExcelDwldDvCd; // 엑셀다운로드 대상 구분 코드
|
||||
|
||||
private String[] srchOrdrInnbs; // 주문번호 배열
|
||||
|
||||
private String srchDatePeriod; // 날짜구간코드
|
||||
/*
|
||||
####################################
|
||||
전체 주문 조회 검색 추가 조건 종료
|
||||
####################################
|
||||
*/
|
||||
|
||||
private String reprsntBrand; // 입점사 브랜드
|
||||
|
||||
private long ordrInnb; // 주문고유번호
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.wb.domainserver.domain.itrnt.main.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class BOItrntMainController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.wb.domainserver.domain.itrnt.main.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
public class ItrntMainController {
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/**
|
||||
* 인트라넷 index 화면
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/itrnt")
|
||||
public String selectAdminRootInqire(HttpServletRequest request, ModelMap model) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
model.addAttribute("nm",user.getTentcpnNm());
|
||||
/*팝업 정보 가져오기*/
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofGet(RESRC.GCONEBO, "/itrnt/bbs/bbsctt/selectBbscttPopupContent"),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/main/index";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.wb.domainserver.domain.itrnt.main.mapper;
|
||||
|
||||
public class BOItrntMainMapper {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.wb.domainserver.domain.itrnt.main.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class BOItrntMainService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.wb.domainserver.domain.itrnt.main.vo;
|
||||
|
||||
public class BOItrntMainVO {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.wb.domainserver.domain.itrnt.main.vo;
|
||||
|
||||
public class ItrntMainVO {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,462 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.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.mbr.mbr.service.BOMbrService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.gradbnef.service.BOGradbnefService;
|
||||
import com.wb.domainserver.domain.gcone.setup.gradbnef.vo.BOGradbnefVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.service.BOOrdrMngrService;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.vo.BOSetupOrdrVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.service.BOItrntMbrService;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntCnsltVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntMbrSrchVO;
|
||||
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.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/mbr")
|
||||
public class BOItrntMbrController {
|
||||
@Autowired
|
||||
private BOItrntMbrService service;
|
||||
@Autowired
|
||||
private BOMbrService mbrService;
|
||||
@Autowired
|
||||
private BOGradbnefService gradbnefService;
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
@Autowired
|
||||
private BOOrdrMngrService boOrdrMngrService;
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 검색 폼
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOMbrListForm")
|
||||
public ResponseEntity<?> selectBOMbrListForm(@RequestBody BOMbrVO vo) {
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
//등급
|
||||
List<DataMap> grad = new ArrayList<>();
|
||||
BOGradbnefVO bnefVO = new BOGradbnefVO();
|
||||
bnefVO.setSopmalCd(user.getReprsntBrand());
|
||||
grad = gradbnefService.selectBOMbrGradListInqireWithoutPaging(bnefVO);
|
||||
|
||||
//공통코드
|
||||
//성별
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SEX");
|
||||
List<?> sex = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(user.getReprsntBrand());
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("sex", sex);
|
||||
content.put("grad", grad);
|
||||
content.put("vo", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("tentGroup",user.getTentGroup());
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 검색
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntMbrList")
|
||||
public ResponseEntity<?> selectBOItrntMbrList(@RequestBody BOItrntMbrSrchVO vo) {
|
||||
log.debug("vo => {}",vo);
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
vo.setSecretKey(boCommonService.selectSecretkey());
|
||||
vo.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
|
||||
// pagination
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<DataMap> mbrList = service.selectBOItrntMbrList(vo);
|
||||
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
content.put("vo", vo);
|
||||
content.put("resultList", mbrList);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 검색
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntsmsMbrList")
|
||||
public ResponseEntity<?> selectBOItrntsmsMbrList(@RequestBody BOItrntMbrSrchVO vo) {
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
vo.setSecretKey(boCommonService.selectSecretkey());
|
||||
vo.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
|
||||
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap = service.selectBOItrntsmsMbrList(vo);
|
||||
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("result", resultMap);
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 고객 정보 조회 ( CRM 회원 정보 )
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOCstmrInfoInqire")
|
||||
public ResponseEntity<?> selectBOCstmrInfoInqire(@RequestBody BOMbrVO vo) {
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
|
||||
// 회원 정보 조회
|
||||
DataMap result = new DataMap();
|
||||
result = mbrService.selectBOMbrInfoUpdtInqire(vo);
|
||||
|
||||
// 회원 활동 정보 조회 ( 마일리지, 쿠폰, 누적 결재 금액, 누적 주문 건수, 최근 로그인 ip, 최근 수정일시 )
|
||||
DataMap resultAct = new DataMap();
|
||||
resultAct = mbrService.selectBOMbrActInfoInqire(vo);
|
||||
|
||||
//pos 가입 매장 조회
|
||||
DataMap pos = new DataMap();
|
||||
pos = mbrService.selectBOJoinStrInqire(vo);
|
||||
|
||||
//외부연동 조회
|
||||
List<DataMap> extrlMember = new ArrayList<>();
|
||||
extrlMember = mbrService.selectBOMbrExtrlMbrInfoInqire(vo);
|
||||
|
||||
//공통코드
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SEX");
|
||||
List<?> sex = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
bOMaComncdVO.setGroupCd("JOIN_ENVRN");
|
||||
List<?> joinEnvrn = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("result", result);
|
||||
content.put("actData", resultAct);
|
||||
content.put("paramVO", vo);
|
||||
content.put("extrlMember", extrlMember);
|
||||
content.put("pos", pos);
|
||||
content.put("sex", sex);
|
||||
content.put("joinEnvrn", joinEnvrn);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 crm 회원정보 수정
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/updateBOMbrInfoUpdtItrnt")
|
||||
public ResponseEntity<?> updateBOMbrInfoUpdtItrnt(@RequestBody BOMbrVO vo) {
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setMngrId(user.getMbrId());
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
String secretKey = "";
|
||||
secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
//관리자 로그 문장 만듦
|
||||
DataMap mngrLog = new DataMap();
|
||||
DataMap data = new DataMap();
|
||||
data.put("id", user.getMbrId());
|
||||
data.put("registIp", vo.getRegistIp());
|
||||
data.put("before", vo.getBeforeStrNm());
|
||||
data.put("after", vo.getStrNm());
|
||||
data.put("actionDv", "store");
|
||||
log.debug("mngrLog {}",data);
|
||||
mngrLog = mbrService.makeMngrLog(data);
|
||||
|
||||
vo.setMngrLogStrt(StringUtil.isNullToString(mngrLog.get("mngrLogStrt")));
|
||||
vo.setMngrLogEnd(StringUtil.isNullToString(mngrLog.get("mngrLogEnd")));
|
||||
|
||||
//관리매장 수정
|
||||
if(!StringUtil.isEmpty(String.valueOf(vo.getStrInnb()))){
|
||||
mbrService.updateBOManageStrUpdt(vo);
|
||||
}
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = mbrService.updateBOMbrInfoUpdtCrm(vo);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 > 고객 상담 조회 폼
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOCnsltDtlsForm")
|
||||
public ResponseEntity<?> selectBOCnsltDtlsForm(@RequestBody BOItrntCnsltVO vo) {
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("COUNSEL_PROCS_STTUS"); // 상담처리상태
|
||||
List<?> procsSttusCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("procsSttusCdList",procsSttusCdList);
|
||||
content.put("paramVO",vo);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 > 고객 상담 조회
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOCnsltDtls")
|
||||
public ResponseEntity<?> selectBOCnsltDtls(@RequestBody BOItrntCnsltVO vo) {
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("COUNSEL_PROCS_STTUS"); // 상담처리상태
|
||||
List<?> procsSttusCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
List<DataMap> resultList = service.selectBOCnsltDtls(vo);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
// 맵에 페이징 정보와 리스트를 넣어줌
|
||||
content.put("paramVO", vo);
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("procsSttusCdList", procsSttusCdList); // 상담처리상태
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 > 고객 상담 등록 폼
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOCnsltRegistPopupForm")
|
||||
public ResponseEntity<?> selectBOCnsltRegistPopupForm(@RequestBody BOItrntCnsltVO vo) {
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("COUNSEL_PROCS_STTUS"); // 상담처리상태
|
||||
List<?> procsSttusCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("cnsltVO", vo);
|
||||
content.put("procsSttusCdList", procsSttusCdList);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 > 고객 상담 등록
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/insertBOCnsltRegist")
|
||||
public ResponseEntity<?> insertBOCnsltRegist(@RequestBody BOItrntCnsltVO vo) {
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb()); //등록자
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
vo.setRegusrnm(user.getTentcpnNm());//등록자명
|
||||
vo.setStrInnb(String.valueOf(user.getUserInnb()));//관리자고유번호
|
||||
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
// 상담 등록 로직
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.insertBOCnsltRegist(vo);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 > 고객 상담 수정 폼
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @author 추지훈
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOCnsltDtlUpdtInqirePopup")
|
||||
public ResponseEntity<?> selectBOCnsltDtlUpdtInqirePopup(@RequestBody BOItrntCnsltVO vo) {
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("COUNSEL_PROCS_STTUS"); // 상담처리상태
|
||||
List<?> procsSttusCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
DataMap result = new DataMap();
|
||||
result = service.selectBOCnsltDtlUpdtInqirePopup(vo);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("cnsltVO", result);
|
||||
content.put("procsSttusCdList", procsSttusCdList);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 > 고객 상담 수정
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @author 추지훈
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/updateBOCnsltUpdt")
|
||||
public ResponseEntity<?> updateBOCnsltUpdt(@RequestBody BOItrntCnsltVO vo) {
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.updateBOCnsltUpdt(vo);
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 > 고객 상담 삭제
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @author 추지훈
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/deleteBOCnsltDel")
|
||||
public ResponseEntity<?> deleteBOCnsltDel(@RequestBody BOItrntCnsltVO vo) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.deleteBOCnsltDel(vo);
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장정보 조회
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @author 추지훈
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOStrNm")
|
||||
public ResponseEntity<?> selectBOStrNm(@RequestBody Map<String, Object> paramMap) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
DataMap content = service.selectBOStrNm(paramMap);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.vo.MaSopmalVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.ItrntSrchMbrVO;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
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.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequestMapping("/itrnt/mbr")
|
||||
public class ItrntMbrController {
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 목록 검색 화면
|
||||
*
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMbrListForm")
|
||||
public String selectMbrListForm(ModelMap model, ItrntSrchMbrVO vo) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOMbrListForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/mbr/ItrntMbrListRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 목록 검색 모달
|
||||
*
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMbrListPopForm")
|
||||
public String selectItrntMbrListPopForm(ModelMap model, ItrntSrchMbrVO vo) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOMbrListForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/mbr/ItrntMbrSrchPopupRForm";
|
||||
}
|
||||
/**
|
||||
* 인트라넷 회원 목록 조회(화면)
|
||||
*
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMbrList")
|
||||
public String selectMbrList(ModelMap model, ItrntSrchMbrVO vo) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOItrntMbrList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("pageUnit",vo.getPageUnit());
|
||||
return "itrnt/mbr/ItrntMbrListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 목록 조회(팝업)
|
||||
*
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMbrPopList")
|
||||
public String selectItrntMbrPopList(ModelMap model, ItrntSrchMbrVO vo) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOItrntMbrList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("pageUnit",vo.getPageUnit());
|
||||
return "itrnt/mbr/ItrntMbrSrchPopupR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 목록 조회(ajax)
|
||||
*selectItrntMbrPopList
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMbrPopListAjax")
|
||||
public ResponseEntity<WnbtResponse> selectItrntMbrPopListAjax(ModelMap model, ItrntSrchMbrVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOItrntsmsMbrList", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 쇼핑몰 url 정보 조회
|
||||
*
|
||||
* @return map
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/getPcUrl")
|
||||
public ResponseEntity<WnbtResponse> getPcUrl(MaSopmalVO vo) {
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalInfoDtl", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 포스 회원 가입 화면
|
||||
*
|
||||
* @param ItrntMbrVO
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMbrJoinForm")
|
||||
public String selectMbrJoinForm(ModelMap model, @RequestParam String store_code) {
|
||||
|
||||
Map<String, Object> paramMap = new HashMap<String, Object>();
|
||||
|
||||
paramMap.put("store_code", store_code);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOStrNm", paramMap),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
model.addAttribute("storeCode", store_code);
|
||||
|
||||
return "itrnt/mbr/MbrJoinForm";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntCnsltVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntMbrSrchVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntMbrMapper {
|
||||
/******************************회원 서비스 ************************************/
|
||||
/*매장별 회원건수조회*/
|
||||
public int selectBOItrntMbrCnt(BOItrntMbrSrchVO vo);
|
||||
/*매장별 회원리스트조회*/
|
||||
public List<DataMap> selectBOItrntMbrList(BOItrntMbrSrchVO vo);
|
||||
/*매장별 회원리스트조회*/
|
||||
public List<DataMap> selectBOItrntsmsMbrList(BOItrntMbrSrchVO vo);
|
||||
|
||||
/*******************************회원 상담 서비스*******************************/
|
||||
/*매장 상당 수정*/
|
||||
Integer selectBOCnsltListCnt(BOItrntCnsltVO vo);
|
||||
/*매장 상당 수정*/
|
||||
List<DataMap> selectBOCnsltListInqire(BOItrntCnsltVO vo);
|
||||
/*매장 상담 상세 조회*/
|
||||
DataMap selectBOCnsltDtlUpdtInqirePopup(BOItrntCnsltVO vo);
|
||||
/*매장 상담 등록*/
|
||||
int insertBOCnsltRegist(BOItrntCnsltVO vo);
|
||||
/*매장 상당 수정*/
|
||||
int updateBOCnsltUpdt(BOItrntCnsltVO vo);
|
||||
/*매장 상당 삭제*/
|
||||
int deleteBOCnsltDel(BOItrntCnsltVO vo);
|
||||
/* 매장명 조회 */
|
||||
DataMap selectBoStrNm(Map<String, Object> paramMap);
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.service;
|
||||
|
||||
import com.nimbusds.jose.shaded.gson.Gson;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.mapper.BOItrntMbrMapper;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntCnsltVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntMbrSrchVO;
|
||||
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 java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BOItrntMbrService {
|
||||
@Autowired
|
||||
private BOItrntMbrMapper mapper;
|
||||
|
||||
/*
|
||||
* 인트라넷 회원 목록 조회
|
||||
*
|
||||
*/
|
||||
public List<DataMap> selectBOItrntMbrList(BOItrntMbrSrchVO vo) {
|
||||
// 인트라넷 회원 목록
|
||||
List<DataMap> resultList = null;
|
||||
// 목록 건수 조회
|
||||
Integer totCnt = mapper.selectBOItrntMbrCnt(vo);
|
||||
// 인트라넷 회원 정보와 페이징 정보
|
||||
vo.getPaginationInfo().setTotalRecordCount(totCnt);
|
||||
if (totCnt > 0) {
|
||||
// 상담 목록 조회
|
||||
resultList = mapper.selectBOItrntMbrList(vo);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/*
|
||||
* 인트라넷 sms 적용 회원 조회
|
||||
*
|
||||
*/
|
||||
public Map<String, Object> selectBOItrntsmsMbrList(BOItrntMbrSrchVO vo) {
|
||||
// 인트라넷 회원 목록
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
// 목록 건수 조회
|
||||
Integer totCnt = mapper.selectBOItrntMbrCnt(vo);
|
||||
if (totCnt > 0) {
|
||||
// 상담 목록 조회
|
||||
resultList = mapper.selectBOItrntsmsMbrList(vo);
|
||||
}
|
||||
resultMap.put("mbrInfo", new Gson().toJson(resultList));
|
||||
resultMap.put("mbrInfoCnt", totCnt);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 상담 목록 조회
|
||||
*/
|
||||
public List<DataMap> selectBOCnsltDtls(BOItrntCnsltVO vo) {
|
||||
// 상담 목록
|
||||
List<DataMap> resultList = null;
|
||||
// 목록 건수 조회
|
||||
Integer totCnt = mapper.selectBOCnsltListCnt(vo);
|
||||
// 상담 정보와 페이징 정보
|
||||
vo.getPaginationInfo().setTotalRecordCount(totCnt);
|
||||
if (totCnt > 0) {
|
||||
// 상담 목록 조회
|
||||
resultList = mapper.selectBOCnsltListInqire(vo);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/*
|
||||
* 상담 등록
|
||||
*/
|
||||
public Map<String, Object> insertBOCnsltRegist(BOItrntCnsltVO vo) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
// mapper 호출
|
||||
int result = mapper.insertBOCnsltRegist(vo);
|
||||
message.put("result", result);
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/*
|
||||
* 상담 상세
|
||||
*/
|
||||
public DataMap selectBOCnsltDtlUpdtInqirePopup(BOItrntCnsltVO vo) {
|
||||
DataMap result = new DataMap();
|
||||
result = mapper.selectBOCnsltDtlUpdtInqirePopup(vo);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* 상담 수정
|
||||
*/
|
||||
public Map<String, Object> updateBOCnsltUpdt(BOItrntCnsltVO vo) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
mapper.updateBOCnsltUpdt(vo);
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/*
|
||||
* 상담 삭제
|
||||
*/
|
||||
public Map<String, Object> deleteBOCnsltDel(BOItrntCnsltVO vo) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
mapper.deleteBOCnsltDel(vo);
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장정보 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOStrNm(Map<String, Object> paramMap) {
|
||||
DataMap content = new DataMap();
|
||||
|
||||
String storeCode = StringUtil.isNullToString(paramMap.get("store_code"));
|
||||
String posCdDvVal = storeCode.substring(0, 3);
|
||||
String posCdPassiveInputVal = storeCode.substring(3);
|
||||
paramMap.put("posCdDvVal", posCdDvVal);
|
||||
paramMap.put("posCdPassiveInputVal", posCdPassiveInputVal);
|
||||
|
||||
content = mapper.selectBoStrNm(paramMap);
|
||||
|
||||
return content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntCnsltVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 매장 상담 컬럼
|
||||
*/
|
||||
|
||||
/**매장상담내역 고유번호(PK)*/
|
||||
private String strCnsltDtlsInnb;
|
||||
/**매장 고유번호(FK)*/
|
||||
private String strInnb;
|
||||
/**관리자 고유번호*/
|
||||
private String mngrInnb;
|
||||
/**회원고유번호*/
|
||||
private String mbrInnb;
|
||||
/**회원구분코드*/
|
||||
private String mbrDvCd;
|
||||
/**상담내용*/
|
||||
private String cnsltCn;
|
||||
/**처리상태*/
|
||||
private String procsSttus;
|
||||
/**처리일시*/
|
||||
private String procsDt;
|
||||
/*작성자이름*/
|
||||
private String regusrnm;
|
||||
/**
|
||||
* 검색
|
||||
*/
|
||||
|
||||
/** 검색_검색어 구분 */
|
||||
private String srchKeywordDv;
|
||||
/** 검색_검색어 */
|
||||
private String srchKeyword;
|
||||
/** 검색_등록일 구분 */
|
||||
private String srchDtDv;
|
||||
/** 검색_시작일 */
|
||||
private String srchStartDate;
|
||||
/** 검색_종료일 */
|
||||
private String srchEndDate;
|
||||
/** 검색_상담자 */
|
||||
private String srchMngrNm;
|
||||
/** 검색_처리 여부 */
|
||||
private String[] srchProcsSttusCd;
|
||||
/** 검색_상담내용 */
|
||||
private String srchCnsltCn;
|
||||
|
||||
/*암호화키*/
|
||||
private String secretKey;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntMbrSrchVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*검색항목*/
|
||||
private String srchDv;
|
||||
/*검색키워드*/
|
||||
private String srchKeyword;
|
||||
/*타검색회원포함*/
|
||||
private String srchOtherMbr;
|
||||
/*가입일 시작*/
|
||||
private String srchStrtRegistDt;
|
||||
/*가입일 종료*/
|
||||
private String srchEndRegistDt;
|
||||
/*최종구매일 시작*/
|
||||
private String srchStrtLastPurchsDt;
|
||||
/*최종구매일 종료*/
|
||||
private String srchEndLastPurchsDt;
|
||||
/*생년 시작*/
|
||||
private String srchStrtBrthYear;
|
||||
/*생년 종료*/
|
||||
private String srchEndBrthYear;
|
||||
/*생월 시작*/
|
||||
private String srchStrtBrthMonth;
|
||||
/*생월 시작*/
|
||||
private String srchEndBrthMonth;
|
||||
/*성별*/
|
||||
private String srchSex;
|
||||
/*마케팅 수신 동의*/
|
||||
private String srchMarktRecptnAgreAt;
|
||||
/*등급*/
|
||||
private String srchGrad;
|
||||
/*마일리지 시작*/
|
||||
private String srchStrtMlg;
|
||||
/*마일리지 종료*/
|
||||
private String srchEndMlg;
|
||||
/*기준 구매일 시작*/
|
||||
private String stdrStrtPurchsPd;
|
||||
/*기준 구매일 종료*/
|
||||
private String stdrEndPurchsPd;
|
||||
/*기준 구매금액 시작*/
|
||||
private String stdrStrtPurchsAmt;
|
||||
/*기준 구매금액 종료*/
|
||||
private String stdrEndPurchsAmt;
|
||||
/*기준 구매횟수 시작*/
|
||||
private String stdrStrtPurchsCnt;
|
||||
/*기준 구매횟수 종료*/
|
||||
private String stdrEndPurchsCnt;
|
||||
/*기준 상품명*/
|
||||
private String stdrGoodsNm;
|
||||
/*비교 구매일 시작*/
|
||||
private String cmprStrtPurchsPd;
|
||||
/*비교 구매일 종료*/
|
||||
private String cmprEndPurchsPd;
|
||||
/*비교 구매금액 시작*/
|
||||
private String cmprStrtPurchsAmt;
|
||||
/*비교 구매금액 종료*/
|
||||
private String cmprEndPurchsAmt;
|
||||
/*비교 구매횟수 시작*/
|
||||
private String cmprStrtPurchsCnt;
|
||||
/*비교 구매횟수 종료*/
|
||||
private String cmprEndPurchsCnt;
|
||||
/*비교 상품명*/
|
||||
private String cmprGoodsNm;
|
||||
/********************************************
|
||||
* 기본 값 확인
|
||||
* *****************************************/
|
||||
/*매장고유번호*/
|
||||
private String strInnb;
|
||||
/*시크릿키*/
|
||||
private String secretKey;
|
||||
/*쇼핑몰코드
|
||||
* */
|
||||
private String sopmalCd;
|
||||
/*정렬조건*/
|
||||
private String orderCnd;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntMbrVO {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.wb.domainserver.domain.itrnt.mbr.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntSrchMbrVO extends AbstractVO {
|
||||
/*검색항목*/
|
||||
private String srchDv;
|
||||
/*검색키워드*/
|
||||
private String srchKeyword;
|
||||
/*타검색회원포함*/
|
||||
private String srchOtherMbr;
|
||||
/*가입일 시작*/
|
||||
private String srchStrtRegistDt;
|
||||
/*가입일 종료*/
|
||||
private String srchEndRegistDt;
|
||||
/*최종구매일 시작*/
|
||||
private String srchStrtLastPurchsDt;
|
||||
/*최종구매일 종료*/
|
||||
private String srchEndLastPurchsDt;
|
||||
/*생년 시작*/
|
||||
private String srchStrtBrthYear;
|
||||
/*생년 종료*/
|
||||
private String srchEndBrthYear;
|
||||
/*생월 시작*/
|
||||
private String srchStrtBrthMonth;
|
||||
/*생월 시작*/
|
||||
private String srchEndBrthMonth;
|
||||
/*성별*/
|
||||
private String srchSex;
|
||||
/*마케팅 수신 동의*/
|
||||
private String srchMarktRecptnAgreAt;
|
||||
/*등급*/
|
||||
private String srchGrad;
|
||||
/*마일리지 시작*/
|
||||
private String srchStrtMlg;
|
||||
/*마일리지 종료*/
|
||||
private String srchEndMlg;
|
||||
/*기준 구매일 시작*/
|
||||
private String stdrStrtPurchsPd;
|
||||
/*기준 구매일 종료*/
|
||||
private String stdrEndPurchsPd;
|
||||
/*기준 구매금액 시작*/
|
||||
private String stdrStrtPurchsAmt;
|
||||
/*기준 구매금액 종료*/
|
||||
private String stdrEndPurchsAmt;
|
||||
/*기준 구매횟수 시작*/
|
||||
private String stdrStrtPurchsCnt;
|
||||
/*기준 구매횟수 종료*/
|
||||
private String stdrEndPurchsCnt;
|
||||
/*기준 상품명*/
|
||||
private String stdrGoodsNm;
|
||||
/*비교 구매일 시작*/
|
||||
private String cmprStrtPurchsPd;
|
||||
/*비교 구매일 종료*/
|
||||
private String cmprEndPurchsPd;
|
||||
/*비교 구매금액 시작*/
|
||||
private String cmprStrtPurchsAmt;
|
||||
/*비교 구매금액 종료*/
|
||||
private String cmprEndPurchsAmt;
|
||||
/*비교 구매횟수 시작*/
|
||||
private String cmprStrtPurchsCnt;
|
||||
/*비교 구매횟수 종료*/
|
||||
private String cmprEndPurchsCnt;
|
||||
/*비교 상품명*/
|
||||
private String cmprGoodsNm;
|
||||
/*쇼핑몰코드*/
|
||||
private String sopmalCd;
|
||||
/*정렬조건*/
|
||||
private String orderCnd;
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
package com.wb.domainserver.domain.itrnt.mngr.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.itrnt.mngr.service.BOItrntMngrService;
|
||||
import com.wb.domainserver.domain.itrnt.mngr.vo.BOItrntMngrVO;
|
||||
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.authentication.MemberJwtToken;
|
||||
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.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.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* 인트라넷 관리자
|
||||
* @author 추지훈
|
||||
* @since 2024-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-05 추지훈 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/gcone/itrnt/mngr")
|
||||
public class BOItrntMngrController {
|
||||
|
||||
@Autowired
|
||||
private BOItrntMngrService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 등록
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBOItrntMngrRegist")
|
||||
public ResponseEntity<?> insertBOItrntMngrRegist(@RequestBody BOItrntMngrVO itrntMngrVO) {
|
||||
|
||||
// 등록
|
||||
Map<String, Object> message = service.insertBOItrntMngrRegist(itrntMngrVO);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 수정
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOItrntMngrDtl")
|
||||
public ResponseEntity<?> updateBOItrntMngrUpdt(@RequestBody BOItrntMngrVO itrntMngrVO) {
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
itrntMngrVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
// service 호출
|
||||
Map<String, Object> message = service.updateBOItrntMngrUpdt(itrntMngrVO);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 삭제
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/deleteBOItrntMngrDel")
|
||||
public ResponseEntity<?> deleteBOItrntMngrDel(@RequestBody BOItrntMngrVO itrntMngrVO) {
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
itrntMngrVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
// service 호출
|
||||
Map<String, Object> message = service.deleteBOItrntMngrDel(itrntMngrVO);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 목록 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping("/selectBOItrntMngrList")
|
||||
public ResponseEntity<?> selectBOItrntMngrList(@RequestBody BOItrntMngrVO itrntMngrVO) {
|
||||
|
||||
// 페이징 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(itrntMngrVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(itrntMngrVO.getRecordCountPerPage());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
// 페이징정보 할당
|
||||
itrntMngrVO.setPaginationInfo(paginationInfo);
|
||||
itrntMngrVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
itrntMngrVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
itrntMngrVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
// 목록 조회
|
||||
List<DataMap> resultList = service.selectBOItrntMngrList(itrntMngrVO);
|
||||
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("paramVO", itrntMngrVO);
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", itrntMngrVO.getPaginationInfo());
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 상세 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntMngrDtlForm")
|
||||
public ResponseEntity<?> selectBOItrntMngrDtlForm(@RequestBody BOItrntMngrVO itrntMngrVO) {
|
||||
|
||||
DataMap result = service.selectBOItrntMngrDtlFrom(itrntMngrVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("result", result);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 입점사 상세 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntMngrTentcpnDtlForm")
|
||||
public ResponseEntity<?> selectBOItrntMngrTentcpnDtlForm(@RequestBody BOItrntMngrVO itrntMngrVO) {
|
||||
|
||||
DataMap result = service.selectBOItrntMngrTentcpnDtlForm(itrntMngrVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("result", result);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 아이디 중복 여부 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/selectBOItrntMngrIdChk")
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
public ResponseEntity<?> selectBOItrntMngrIdChk(@RequestBody BOItrntMngrVO itrntMngrVO){
|
||||
|
||||
Map<String, Object> message = service.selectBOItrntMngrIdChk(itrntMngrVO);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
package com.wb.domainserver.domain.itrnt.mngr.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.mngr.vo.ItrntMngrVO;
|
||||
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 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.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequestMapping("/itrnt/mngr")
|
||||
public class ItrntMngrController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 목록 조회
|
||||
* @param ItrntMngrVO
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMngrList")
|
||||
public String selectItrntMngrList(ItrntMngrVO vo, ModelMap model) {
|
||||
|
||||
//FIXME 목록 조회시 고유번호가 필요하므로 임의 값 세팅
|
||||
vo.setStrInnb("24");
|
||||
//목록 조회시 페이지 인덱스는 0부터 시작함으로 0세팅
|
||||
vo.setPageIndex(0);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/selectBOItrntMngrList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/mngr/ItrntMngrListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 등록
|
||||
* @param ItrntMngrVO
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertItrntMngr", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> InsertItrntMngr(ItrntMngrVO vo) {
|
||||
|
||||
//FIXME 등록시 대표관리자여부 필요하여 임시 세팅
|
||||
vo.setReprsntMngrAt("Y");
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/insertBOItrntMngrRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 등록 폼
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectItrntMngrForm")
|
||||
public String selectItrntMngrForm() {
|
||||
|
||||
return "itrnt/mngr/ItrntMngrFormR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 수정
|
||||
* @param ItrntMngrVO
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateItrntMngrUptDtl", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateItrntMngrDtl(ItrntMngrVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/updateBOItrntMngrDtl", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 입점사 상세 화면 폼
|
||||
* @param ItrntMngrVO
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectItrntMngrTentcpnDtlForm")
|
||||
public String selectItrntMngrTentcpnDtlForm(ItrntMngrVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/selectBOItrntMngrTentcpnDtlForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/mngr/ItrntMngrTentcpnDtlFormR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 입점사 상세 수정
|
||||
* @param ItrntMngrVO
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateItrntMngrTentcpnDtlForm", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateItrntMngrTentcpnDtlForm(ItrntMngrVO vo) {
|
||||
|
||||
//TODO 해당 내용 확인 중
|
||||
// - 수정저장시 (/provider_process/provider_update)
|
||||
// - 직접 쿼리로 DB에 넣지 않고 아래와 같은 구문으로 업데이트 처리 함
|
||||
// - $re_data = $this->hub_store->sync_update($send_data);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 상세 수정
|
||||
* @param ItrntMngrVO
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateItrntMngrDtlForm", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateItrntMngrDtlForm(ItrntMngrVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/updateBOupdateItrntMngrDtlForm", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 상세 화면 폼
|
||||
* @param ItrntMngrVO
|
||||
* @param model 모델객체
|
||||
* @return String JSP 경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectItrntMngrDtlForm")
|
||||
public String selectItrntMngrDtlForm(ItrntMngrVO vo, ModelMap model) {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/selectBOItrntMngrDtlForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/mngr/ItrntMngrDtlFormR";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 삭제
|
||||
* @param ItrntMngrVO
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteItrntMngrDel", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> deleteItrntMngr(ItrntMngrVO vo) {
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/deleteBOItrntMngrDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 아이디 중복 여부 조회
|
||||
* @param ItrntMngrVO
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMngrIdChk", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> selectItrntMngrIdChk(ItrntMngrVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/mngr/selectBOItrntMngrIdChk", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.wb.domainserver.domain.itrnt.mngr.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.mngr.vo.BOItrntMngrVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntMngrMapper {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 등록
|
||||
* @param itrntMngrVO
|
||||
*/
|
||||
int insertBOItrntMngrRegist(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 수정
|
||||
* @param itrntMngrVO
|
||||
*/
|
||||
int updateBOItrntMngrUpdt(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 삭제
|
||||
* @param itrntMngrVO
|
||||
*/
|
||||
int deleteBOItrntMngrDel(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 목록 건수
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
int selectBOItrntMngrListCnt(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 목록 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
List<DataMap> selectBOItrntMngrList(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 상세 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
DataMap selectBOItrntMngrDtlFrom(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 입점사 상세 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
DataMap selectBOItrntMngrTentcpnDtlForm(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 비밀번호 변경 이력 저장
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
int insertBOItrntMngrPwdHistory(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 아이디 중복 여부 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
int selectBOItrntMngrIdChk(BOItrntMngrVO itrntMngrVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 조회
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
DataMap selectBOItrntMngr(BOItrntMngrVO itrntMngrVO);
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
package com.wb.domainserver.domain.itrnt.mngr.service;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.mngr.mapper.BOItrntMngrMapper;
|
||||
import com.wb.domainserver.domain.itrnt.mngr.vo.BOItrntMngrVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BOItrntMngrService {
|
||||
|
||||
@Autowired
|
||||
private BOItrntMngrMapper mapper;
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 등록
|
||||
*
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> insertBOItrntMngrRegist(BOItrntMngrVO itrntMngrVO) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
|
||||
try {
|
||||
//아이디 중복 체크
|
||||
int idChk = mapper.selectBOItrntMngrIdChk(itrntMngrVO);
|
||||
if (idChk > 0) {
|
||||
|
||||
message.put("message", "idExist");
|
||||
return message;
|
||||
}
|
||||
|
||||
// 등록
|
||||
int regist = mapper.insertBOItrntMngrRegist(itrntMngrVO);
|
||||
if (regist > 0) {
|
||||
|
||||
//TODO : AS-IS prvider_Seq 받아온 후 비밀번호 해쉬
|
||||
|
||||
//TODO : AS-IS 비밀번호 DB 업데이트
|
||||
// update set fm_provider provider_passwd = #{provider_passwd} where provider_seq = #{provider_seq}
|
||||
|
||||
message.put("message", "success");
|
||||
|
||||
} else {
|
||||
|
||||
message.put("message", "fail");
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 수정
|
||||
*
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> updateBOItrntMngrUpdt(BOItrntMngrVO itrntMngrVO) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
|
||||
try {
|
||||
|
||||
//provider 조회
|
||||
DataMap mngr =mapper.selectBOItrntMngr(itrntMngrVO);
|
||||
|
||||
//기존 비밀번호 일치 여부
|
||||
//TODO 비밀번호 복호화 필요
|
||||
if(!itrntMngrVO.getTentcpnPassword().isEmpty()
|
||||
&& !itrntMngrVO.getCurrentPassword().isEmpty()){
|
||||
if(!mngr.get("tentcpnPassword").toString().equals(itrntMngrVO.getCurrentPassword())){
|
||||
message.put("message", "pwdNotMatch");
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// mapper 호출
|
||||
int update = mapper.updateBOItrntMngrUpdt(itrntMngrVO);
|
||||
|
||||
//비밀번호 변경시 이력 저장
|
||||
//TODO 비밀번호 암호화 필요
|
||||
if (update > 0 && !itrntMngrVO.getTentcpnPassword().isEmpty()) {
|
||||
mapper.insertBOItrntMngrPwdHistory(itrntMngrVO);
|
||||
}
|
||||
|
||||
if (update > 0) {
|
||||
message.put("message", "success");
|
||||
} else {
|
||||
message.put("message", "fail");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 삭제
|
||||
*
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> deleteBOItrntMngrDel(BOItrntMngrVO itrntMngrVO) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
|
||||
if(itrntMngrVO.getStrInnb().isEmpty()){
|
||||
message.put("message", "fail");
|
||||
return message;
|
||||
}
|
||||
|
||||
try {
|
||||
// mapper 호출
|
||||
int rs = mapper.deleteBOItrntMngrDel(itrntMngrVO);
|
||||
|
||||
if (rs > 0) {
|
||||
message.put("message", "success");
|
||||
} else {
|
||||
message.put("message", "fail");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 목록 조회
|
||||
*
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntMngrList(BOItrntMngrVO itrntMngrVO) {
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
|
||||
if(itrntMngrVO.getStrInnb().isEmpty()){
|
||||
return resultList;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
// 목록 건수 조회
|
||||
int totCnt = mapper.selectBOItrntMngrListCnt(itrntMngrVO);
|
||||
|
||||
// 페이징 정보 할당
|
||||
itrntMngrVO.getPaginationInfo().setTotalRecordCount(totCnt);
|
||||
|
||||
if (totCnt > 0) {
|
||||
// 목록 조회
|
||||
resultList = mapper.selectBOItrntMngrList(itrntMngrVO);
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 상세 조회
|
||||
*
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntMngrDtlFrom(BOItrntMngrVO itrntMngrVO) {
|
||||
DataMap result = new DataMap();
|
||||
|
||||
if(itrntMngrVO.getStrInnb().isEmpty()){
|
||||
return result;
|
||||
}
|
||||
|
||||
try{
|
||||
// 상세 정보 반환
|
||||
result = mapper.selectBOItrntMngrDtlFrom(itrntMngrVO);
|
||||
|
||||
if(result != null){
|
||||
//관리자 권한 파싱
|
||||
DataMap mngrAuthor = mngrAuthorToView(result);
|
||||
|
||||
if(!mngrAuthor.isEmpty()){
|
||||
//기존 DB 쿼리 결과값 삭제
|
||||
result.remove("mngrAuthor");
|
||||
//파싱한 관리자 권한 put
|
||||
result.put("mngrAuthor", mngrAuthor);
|
||||
}
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 입점사 상세 조회
|
||||
*
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntMngrTentcpnDtlForm(BOItrntMngrVO itrntMngrVO) {
|
||||
DataMap result = new DataMap();
|
||||
|
||||
if(itrntMngrVO.getStrInnb().isEmpty()){
|
||||
return result;
|
||||
}
|
||||
|
||||
try{
|
||||
// 상세 정보 반환
|
||||
result = mapper.selectBOItrntMngrTentcpnDtlForm(itrntMngrVO);
|
||||
|
||||
if(result != null){
|
||||
//관리자 권한 파싱
|
||||
DataMap mngrAuthor = mngrAuthorToView(result);
|
||||
|
||||
if(!mngrAuthor.isEmpty()){
|
||||
//기존 DB 쿼리 결과값 삭제
|
||||
result.remove("mngrAuthor");
|
||||
//파싱한 관리자 권한 put
|
||||
result.put("mngrAuthor", mngrAuthor);
|
||||
}
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 관리자 아이디 중복 여부 조회
|
||||
*
|
||||
* @param itrntMngrVO
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> selectBOItrntMngrIdChk(BOItrntMngrVO itrntMngrVO) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
|
||||
if(itrntMngrVO.getTentcpnId().isEmpty()){
|
||||
message.put("message","fail");
|
||||
return message;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
int result = mapper.selectBOItrntMngrIdChk(itrntMngrVO);
|
||||
|
||||
if (result > 0) {
|
||||
message.put("message", "idExist");
|
||||
} else {
|
||||
message.put("message", "notExist");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자 권한 파싱
|
||||
* 테이블 fm_store 컬럼 mngrAuthor의 String을 DataMap으로 파싱하여 fo로 전달
|
||||
* @param DataMap
|
||||
* @return DataMap
|
||||
*/
|
||||
private DataMap mngrAuthorToView(DataMap result){
|
||||
DataMap rs = new DataMap();
|
||||
|
||||
String authToStr = result.get("mngrAuthor").toString();
|
||||
if(!authToStr.isBlank()){
|
||||
|
||||
String[] splitStr = authToStr.split("\\|\\|");
|
||||
for (String s : splitStr) {
|
||||
String[] sp = s.split("=");
|
||||
rs.put(sp[0], sp[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return rs;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.wb.domainserver.domain.itrnt.mngr.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntMngrVO extends AbstractVO{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**공급사 고유번호 */
|
||||
private String strInnb;
|
||||
|
||||
/**입점사 아이디 */
|
||||
private String tentcpnId;
|
||||
|
||||
private String shopSno;
|
||||
|
||||
/**입점사명 */
|
||||
private String tentcpnNm;
|
||||
|
||||
/**아이피 접속 제한 */
|
||||
private String accesLmttIp;
|
||||
|
||||
/** 비밀번호 변경 이력 고유 번호*/
|
||||
private String historySeq;
|
||||
|
||||
/**현재 비밀번호 */
|
||||
private String currentPassword;
|
||||
|
||||
/**변경할 비밀번호*/
|
||||
private String tentcpnPassword;
|
||||
|
||||
|
||||
/**
|
||||
* 매니저 권한 목록
|
||||
* 매출 분석
|
||||
* 판매 분석
|
||||
* 회원 관리
|
||||
* 마이 페이지
|
||||
* 관리자 리스트
|
||||
* */
|
||||
private String mngrAuthor;
|
||||
|
||||
/**대표 관리자 여부*/
|
||||
private String reprsntMngrAt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.wb.domainserver.domain.itrnt.mngr.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntMngrVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**공급사 고유번호 */
|
||||
private String strInnb;
|
||||
|
||||
/**입점사 아이디 */
|
||||
private String tentcpnId;
|
||||
|
||||
private String shopSno;
|
||||
|
||||
/**입점사명 */
|
||||
private String tentcpnNm;
|
||||
|
||||
/**아이피 접속 제한 */
|
||||
private String accesLmttIp;
|
||||
|
||||
/** 비밀번호 변경 이력 고유 번호*/
|
||||
private String historySeq;
|
||||
|
||||
/**현재 비밀번호 */
|
||||
private String currentPassword;
|
||||
|
||||
/**변경할 비밀번호*/
|
||||
private String tentcpnPassword;
|
||||
|
||||
|
||||
/**
|
||||
* 매니저 권한 목록
|
||||
* 매출 분석
|
||||
* 판매 분석
|
||||
* 회원 관리
|
||||
* 마이 페이지
|
||||
* 관리자 리스트
|
||||
* */
|
||||
private String mngrAuthor;
|
||||
|
||||
/**대표 관리자 여부*/
|
||||
private String reprsntMngrAt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,561 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.controller;
|
||||
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||
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.mbr.mbr.vo.BOMbrSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageFileVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageAlbumVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.service.BOItrntMbrService;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntMbrSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.service.BOItrntMssageService;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageAlbumVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageVO;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* 인트라넷 관리자
|
||||
* @author 추지훈
|
||||
* @since 2024-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-05 추지훈 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/itrnt/ntcn/mssage")
|
||||
public class BOItrntMssageController {
|
||||
|
||||
@Autowired
|
||||
private BOItrntMssageService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
@Autowired
|
||||
private BOItrntMbrService boItrntMbrService;
|
||||
|
||||
/**
|
||||
* 포스 회원 가입 문자 발송
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @author 추지훈
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/insertPosMbrSend")
|
||||
public ResponseEntity<?> insertPosMbrSend(@RequestBody Map<String, Object> paramMap) {
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
|
||||
paramMap.put("secretKey", boCommonService.selectSecretkey());
|
||||
message = service.insertPosMbrSend(paramMap);
|
||||
|
||||
// Map<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("smsInnb", message.get("smsInnb"));
|
||||
|
||||
DataMap sureMap = new DataMap();
|
||||
sureMap = service.updatePosMbrSendCode(paramMap);
|
||||
|
||||
message = service.insertPosMbrSureRegist(sureMap);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 발송 내역 검색 코드 조회
|
||||
* @param bOSmsSrchVO
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
// @RequestMapping(value = "/selectItrntMssagePassivSndngListInqireRForm") //fo 중복이어서 주석처리함 사용시 변경 처리
|
||||
public ResponseEntity<?> selectItrntMssagePassivSndngListInqireRForm(@RequestBody BOItrntMssageSrchVO bOMssageSrchVO) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("04".equals(user.getSysDvCd())){
|
||||
bOMssageSrchVO.setSrchStrInnb(new BigInteger(String.valueOf(user.getUserInnb())));
|
||||
bOMssageSrchVO.setSopmalCd(user.getReprsntBrand());
|
||||
bOMssageSrchVO.setSrchRegusrDv(user.getSysDvCd());
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
//브랜드코드
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("BRAND");
|
||||
List<DataMap> brand = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//메시지 종류
|
||||
bOMaComncdVO.setGroupCd("DV");
|
||||
List<DataMap> dv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//발송상태
|
||||
bOMaComncdVO.setGroupCd("STTUS");
|
||||
List<DataMap> sttus = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//검색 폼 code
|
||||
resultMap.put("brand",maSopmalService.selectBOSopmalCdNm());
|
||||
resultMap.put("dv",dv);
|
||||
resultMap.put("sttus",sttus);
|
||||
resultMap.put("bOMssageSrchVO",bOMssageSrchVO);
|
||||
resultMap.put("storeList", service.selectBOItrntMssageStrList(bOMssageSrchVO));
|
||||
resultMap.put("tentGroup",user.getTentGroup());
|
||||
//resultMap.put("code",service.selectBOSmsSndngDtlsListInqireForm());
|
||||
|
||||
return ApiResponse.of(resultMap).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 발송 폼 조회
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOItrntMssagePassivSndng")
|
||||
public ResponseEntity<?> selectBOItrntMssagePassivSndng(@RequestBody BOItrntMssageVO boItrntMssageVO) {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("04".equals(user.getSysDvCd())){
|
||||
boItrntMssageVO.setStrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
boItrntMssageVO.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("storeInfoMap", service.selectBOStoreInfoInqire(boItrntMssageVO));
|
||||
content.put("sopmalCd", boItrntMssageVO.getSopmalCd());
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 메시지 발송 팝업 폼 조회
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOMssageSndngPopupForm")
|
||||
public ResponseEntity<?> selectBOMssageSndngPopupForm(@RequestBody BOItrntMssageVO boItrntMssageVO) {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("04".equals(user.getSysDvCd())){
|
||||
boItrntMssageVO.setStrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
boItrntMssageVO.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("storeInfoMap", service.selectBOStoreInfoInqire(boItrntMssageVO));
|
||||
content.put("sopmalCd", boItrntMssageVO.getSopmalCd());
|
||||
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 발송 내역 목록 조회
|
||||
* @param boItrntMssageVO
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOItrntMssagePassivSndngListInqire")
|
||||
public ResponseEntity<?> selectBOItrntMssagePassivSndngListInqire(@RequestBody BOItrntMssageSrchVO boItrntMssageSrchVO) {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
//인트라넷 구분
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
boItrntMssageSrchVO.setSrchRegusrDv(user.getSysDvCd());
|
||||
boItrntMssageSrchVO.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
//매장관리자 구분
|
||||
if("02".equals(user.getTentGroup())) {
|
||||
boItrntMssageSrchVO.setSrchStrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
}
|
||||
|
||||
|
||||
DataMap content = new DataMap();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(boItrntMssageSrchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(boItrntMssageSrchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
boItrntMssageSrchVO.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
boItrntMssageSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
boItrntMssageSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
boItrntMssageSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
boItrntMssageSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||
|
||||
//메시지 발송 목록 조회 결과 및 페이징정보 넣기
|
||||
content.put("paginationInfo", boItrntMssageSrchVO.getPaginationInfo());
|
||||
content.put("boItrntMssageMap", service.selectItrntMssagePassivSndngListInqire(boItrntMssageSrchVO));
|
||||
content.put("boItrntMssageSrchVO", boItrntMssageSrchVO);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 메세지 상세 조회
|
||||
* @param boItrntMssageVO
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOItrntMssageDtlInfo")
|
||||
public ResponseEntity<?> selectBOItrntMssageDtlInfo(@RequestBody BOItrntMssageSrchVO boItrntMssageSrchVO) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
//인트라넷 구분
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
boItrntMssageSrchVO.setSrchRegusrDv(user.getSysDvCd());
|
||||
boItrntMssageSrchVO.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
//매장관리자 구분
|
||||
if("02".equals(user.getTentGroup())) {
|
||||
boItrntMssageSrchVO.setSrchStrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
boItrntMssageSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||
content.put("boItrntMssageDtlMap", service.selectBOItrntMssageDtlInfo(boItrntMssageSrchVO));
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* SMS 메시지 발송
|
||||
* batch_process/gc_send_sms
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBOItrntMssageSndng")
|
||||
public ResponseEntity<?> insertBOItrntMssageSndng(@RequestBody BOItrntMssageVO boItrntMssageVO) {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
//인트라넷 구분
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
boItrntMssageVO.setRegusrDv(user.getSysDvCd());
|
||||
boItrntMssageVO.setSopmalCd(user.getReprsntBrand());
|
||||
boItrntMssageVO.setStrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
}
|
||||
|
||||
|
||||
boItrntMssageVO.setSecretKey(boCommonService.selectSecretkey());
|
||||
|
||||
|
||||
DataMap message = new DataMap();
|
||||
//메세지 발송 등록, 발송 대상 등록
|
||||
DataMap mssageRslt = service.insertBOItrntMssageSndng(boItrntMssageVO);
|
||||
message.put("messageRslt", mssageRslt);
|
||||
|
||||
DataMap paramMap = new DataMap();
|
||||
paramMap.put("smsInnb", boItrntMssageVO.getSmsInnb());
|
||||
|
||||
|
||||
List<String> srchSttusList = new ArrayList<String>();
|
||||
srchSttusList.add("REG");
|
||||
paramMap.put("srchSttus", srchSttusList);
|
||||
paramMap.put("secretKey", boCommonService.selectSecretkey());
|
||||
|
||||
|
||||
DataMap messageSureInsert = new DataMap();
|
||||
DataMap cntResult = new DataMap();
|
||||
DataMap syncResult = new DataMap();
|
||||
DataMap messageLotteInsert = new DataMap();
|
||||
//if(vo.getSopmalCd().equals("NC") || vo.getSopmalCd().equals("CH")) {
|
||||
// //슈어엠테이블 등록
|
||||
messageSureInsert = service.insertBOItrntMssageSureReigst(paramMap);
|
||||
|
||||
message.put("messageSureInsert", messageSureInsert);
|
||||
// //대상 수 재설정
|
||||
// cntResult = service.updateBOMssageSureCnt(paramMap);
|
||||
//
|
||||
// //싱크
|
||||
// syncResult = service.updateBOMssageSync(paramMap);
|
||||
//
|
||||
// //슈어 등록
|
||||
// message.put("messageSureInsert", messageSureInsert);
|
||||
//
|
||||
// //롯데 등록
|
||||
// message.put("messageLotteInsert", messageLotteInsert);
|
||||
//
|
||||
// //대상 수 설정`
|
||||
// message.put("messageCnt", cntResult);
|
||||
// //슈어 싱크
|
||||
// message.put("messageSync", syncResult);
|
||||
// log.info("syncResult {}", syncResult);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장별 등록된 이미지 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOItrntMssagePassivSndngImgPopupForm")
|
||||
public ResponseEntity<?> selectBOItrntMssagePassivSndngImgPopupForm(@RequestBody BOItrntMssageFileVO vo) {
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
//인트라넷 구분
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setProviderSeq(BigInteger.valueOf(user.getUserInnb()));
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
}
|
||||
|
||||
|
||||
//목록
|
||||
content.put("sopmalCd", vo.getSopmalCd());
|
||||
content.put("itrntFileList", service.selectBOItrntMssagePassivSndngImgPopupForm(vo));
|
||||
content.put("providerSeq", vo.getProviderSeq());
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 첨부파일 등록
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBOIntrntSndngImg")
|
||||
public ResponseEntity<?> insertBOIntrntSndngImg(@RequestBody BOItrntMssageFileVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
//인트라넷 구분
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setProviderSeq(BigInteger.valueOf(user.getUserInnb()));
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
}
|
||||
|
||||
|
||||
DataMap message = new DataMap();
|
||||
//상세 내역 조회
|
||||
message = service.insertBOIntrntSndngImg(vo);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
자주쓰는 메세지
|
||||
*************************************/
|
||||
/**
|
||||
* 저장 메시지 팝업 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBORegistMssagePopup")
|
||||
public ResponseEntity<?> selectBORegistMssagePopup(@RequestBody BOItrntMssageAlbumVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
//인트라넷 구분
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
content.put("boCtrlMap", service.selectBORegistMssagePopup(vo));
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 자주 쓰는 메시지 저장
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/insertBOMssageAditRegist")
|
||||
public ResponseEntity<?> insertBOMssageAditRegist(@RequestBody BOItrntMssageAlbumVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
//인트라넷 구분
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message = service.insertBOMssageAditRegist(vo);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 자주 쓰는 메시지 수정
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOMssageAditUpdt")
|
||||
public ResponseEntity<?> updateBOMssageAditUpdt(@RequestBody BOItrntMssageAlbumVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message = service.updateBOMssageAditUpdt(vo);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 자주 쓰는 메시지 삭제
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/deleteBOMssageAdit")
|
||||
public ResponseEntity<?> deleteBOMssageAdit(@RequestBody BOItrntMssageAlbumVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
DataMap message = service.deleteBOMssageAdit(vo);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 자주 메시지 카테고리 조회
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOMssageAditPopupForm")
|
||||
public ResponseEntity<?> selectBOMssageAditPopupForm(@RequestBody BOItrntMssageAlbumVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("boAlbumMap", service.selectBOMssageAditPopupForm(vo));
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 자주 쓰는 카테고리 삭제
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/deleteBOMssageAditCtgy")
|
||||
public ResponseEntity<?> deleteBOMssageAditCtgy(@RequestBody BOItrntMssageAlbumVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("04".equals(user.getSysDvCd())) {
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message = service.deleteBOMssageAditCtgy(vo);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************
|
||||
공통
|
||||
*****************************************************/
|
||||
|
||||
/**
|
||||
* 고객센터/무료수신거부 조회
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOShopNb")
|
||||
public ResponseEntity<?> selectBOShopNb(@RequestBody BOItrntMssageVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("04".equals(user.getSysDvCd())){
|
||||
vo.setStrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("shopNbMap", service.selectBOShopNb(vo));
|
||||
content.put("sopmalCd", vo.getSopmalCd());
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,481 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.ItrntMbrVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.ItrntSrchMbrVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.ItrntMssageSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.ItrntMssageVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.ItrntSendVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.ItrntMssageFileVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.MssageAlbumVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.MssageVO;
|
||||
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 jakarta.servlet.http.HttpServletRequest;
|
||||
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.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequestMapping("/itrnt/ntcn/mssage")
|
||||
public class ItrntMssageController {
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
|
||||
/**
|
||||
* 포스 회원 가입 문자 발송
|
||||
* @param vo
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertPosMbrSend")
|
||||
public ResponseEntity<WnbtResponse> insertPosMbrSend(ItrntSendVO vo) {
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/insertPosMbrSend", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 메시지 발송 관리 화면
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntMssagePassivSndngManage")
|
||||
public String selectItrntMssagePassivSndngManage(ItrntMssageVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssagePassivSndngManage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 발송 화면
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntMssagePassivSndng")
|
||||
public String selectItrntMssagePassivSndng(ItrntMssageVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOItrntMssagePassivSndng", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/ntcn/mssage/ItrntMssagePassivSndngC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 발송 팝업 화면
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntMssageSndngPopupForm")
|
||||
public String selectItrntMssageSndngPopupForm(MssageVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOMssageSndngPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssageSndngPopupC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 발송 내역 폼
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntMssagePassivSndngListInqireRForm")
|
||||
public String selectItrntMessagePassivSndngListInqireRForm(ItrntMssageVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngDtlsListInqireForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssagePassivSndngListInqireRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 수동 발송 내역 목록 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntMssagePassivSndngListInqire")
|
||||
public String selectItrntMessagePassivSndngListInqire(ItrntMssageSrchVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
if(vo.getSrchDv() == null) {
|
||||
List<String> srchDvList = new ArrayList<>();
|
||||
srchDvList.add("SMS");
|
||||
srchDvList.add("LMS");
|
||||
vo.setSrchDv(srchDvList);
|
||||
}
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOItrntMssagePassivSndngListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssagePassivSndngListInqireR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 수동 발송 상세 조회
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntMssagePassivSndngDtlPopupInqire")
|
||||
public String selectItrntMssagePassivSndngDtlPopupInqire(ItrntMssageSrchVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOItrntMssageDtlInfo", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssagePassivSndngDtlPopupR";
|
||||
}
|
||||
|
||||
/**
|
||||
* SMS 수동 발송
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertItrntMssageSndng")
|
||||
public ResponseEntity<WnbtResponse> insertItrntMssageSndng(ItrntMssageVO vo, BindingResult bindingResult){
|
||||
|
||||
if(bindingResult.hasErrors()){
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
// 응담객체에 메시지와 함께 반환결과 처리
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/insertBOItrntMssageSndng", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 회원 목록 조회
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMbrList")
|
||||
public String selectMbrList(ModelMap model, ItrntMbrVO vo) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/mbr/selectBOMbrList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/mbr/MbrListR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 수동 이미지 첨부 팝업
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntMssagePassivSndngImgPopupForm")
|
||||
public String selectBOItrntMssagePassivSndngImgPopupForm(ItrntMssageFileVO vo, ModelMap model) {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOItrntMssagePassivSndngImgPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssagePassivSndngImgPopupC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 이미지 등록
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertIntrntSndngImg")
|
||||
public ResponseEntity<WnbtResponse> insertIntrntSndngImg(ItrntMssageFileVO vo, ModelMap model,
|
||||
HttpServletRequest request,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
String shopCd = vo.getSopmalCd();
|
||||
request.setAttribute("shopCd", shopCd);
|
||||
request.setAttribute("pathGubun", "ETCM");
|
||||
|
||||
//파일 업로드만 실행, 정보는 vo에 담아서 BO에서 처리
|
||||
List<HashMap<String, Object>> ulpladFileMap = new ArrayList<HashMap<String,Object>>();
|
||||
|
||||
try {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException("파일 업로드에 실패하였습니다.");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/insertBOIntrntSndngImg", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 이미지 삭제
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteIntrntSndngImg")
|
||||
public ResponseEntity<WnbtResponse> deleteIntrntSndngImg(ItrntMssageFileVO vo, ModelMap model,
|
||||
HttpServletRequest request,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/deleteBOIntrntSndngImg", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************
|
||||
자주 쓰는 메시지 START
|
||||
*****************************************************/
|
||||
|
||||
/**
|
||||
* 자주쓰는 메시지 팝업
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntRegistMssagePopup")
|
||||
public String selectItrntRegistMssagePopup(MssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBORegistMssagePopup", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntRegistMssagePopupR";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 자주쓰는 메시지 추가 팝업
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectItrntMssageAditPopupForm")
|
||||
public String selectItrntMssageAditPopupForm(MssageVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOMssageAditPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssageAditPopupC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 자주쓰는 메시지 등록
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertItrntMssageAditRegist")
|
||||
public ResponseEntity<?> insertItrntMssageAditRegist(MssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/insertBOMssageAditRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 자주 쓰는 메시지 수정
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateItrntMssageAditUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateItrntMssageAditUpdt(MssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/updateBOMssageAditUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 자주 쓰는 메시지 삭제
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteItrntMssageAdit")
|
||||
public ResponseEntity<WnbtResponse> deleteItrntMssageAdit(MssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/deleteBOMssageAdit", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 자주 쓰는 카테고리 삭제
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteItrntMssageAditCtgy")
|
||||
public ResponseEntity<WnbtResponse> deleteItrntMssageAditCtgy(MssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/deleteBOMssageAditCtgy", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
자주 쓰는 메시지 END
|
||||
*****************************************************/
|
||||
|
||||
|
||||
/*****************************************************
|
||||
공통 START
|
||||
*****************************************************/
|
||||
|
||||
/**
|
||||
* 고객센터/무료수신거부 조회
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectItrntShopNb")
|
||||
public ResponseEntity<?> selectShopNb(ItrntMssageVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOShopNb", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 회원 팝업 폼
|
||||
* @param mbrSrchVO
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectItrntMbrSrchPopupRForm")
|
||||
public String selectMbrSrchPopupRForm(ModelMap model, ItrntSrchMbrVO mbrSrchVO,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
mbrSrchVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
// mbrSrchVO.setPopDv("Y");
|
||||
//페이징값 가져오기
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectBOMbrListInqireForm", mbrSrchVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssageMbrSrchPopupRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 팝업 폼
|
||||
* @param mbrSrchVO
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectItrntMbrList")
|
||||
public String selectItrntMbrList(ModelMap model, ItrntSrchMbrVO mbrSrchVO,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
mbrSrchVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
// mbrSrchVO.setPopDv("Y");
|
||||
//페이징값 가져오기
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/mssage/selectItrntMbrList", mbrSrchVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("pageUnit",mbrSrchVO.getPageUnit());
|
||||
|
||||
return "itrnt/ntcn/mssage/ItrntMssageMbrListR";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageFileVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageAlbumVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageVO;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntMbrSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageAlbumVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntMssageVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.mssage.vo.BOItrntSendVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntMssageMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 포스 회원 가입 문자 발송
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int insertPosMbrSend(BOItrntSendVO sendVO);
|
||||
|
||||
/**
|
||||
* 포스 회원 가입 문자 대상자 등록
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
int insertPosMbrSendTo(BOItrntSendVO vo);
|
||||
|
||||
/**
|
||||
* 포스 회원 가임 문자 코드 수정
|
||||
* @param boItrntSendVO
|
||||
*/
|
||||
void updateSendToCode(BOItrntSendVO boItrntSendVO);
|
||||
|
||||
|
||||
/**
|
||||
* 포스 회원 가입 발송 대상 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
DataMap selectSendTrgt(Map<String, Object> paramMap);
|
||||
|
||||
/**
|
||||
* 인트라넷 메세지 총 개수 조회
|
||||
* @param boItrntMssageVO
|
||||
* @return
|
||||
*/
|
||||
Integer selectBOItrntPassiveMssageSndngTotCnt(BOItrntMssageSrchVO boItrntMssageVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 메세지 목록 조회
|
||||
* @param boItrntMssageVO
|
||||
* @return
|
||||
*/
|
||||
List<DataMap> selectItrntMssagePassivSndngListInqire(BOItrntMssageSrchVO boItrntMssageVO);
|
||||
|
||||
DataMap selectBOItrntMssageResultSttusCnt(BOItrntMssageSrchVO boItrntMssageVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 메세지 상세 조회
|
||||
*/
|
||||
List<DataMap> selectBOItrntMssageDtlInfo(BOItrntMssageSrchVO boItrntMssageSrchVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 메세지 등록
|
||||
*/
|
||||
void insertBOItrntMssageSndng(BOItrntMssageVO boItrntMssageVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 메세지 대상자 등록
|
||||
*/
|
||||
void insertBOItrntMssageToDtls(List<BOItrntMssageVO> mssageVoList);
|
||||
|
||||
void updateBOItrntMssageCntUpdt(BOItrntMssageVO boItrntMssageVO);
|
||||
|
||||
DataMap selectBOMssagePassivSndngImgByFseq(BigInteger fSeq);
|
||||
|
||||
void insertBOMssageAtchmnfilImg(BOItrntMssageVO boItrntMssageVO);
|
||||
|
||||
List<DataMap> selectBOItrntMssageListInqireByInnb(DataMap paramMap);
|
||||
|
||||
/**
|
||||
* 인트라넷 메세지 발송 대상 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
List<DataMap> selectBOSmsSndngDtlsListInqireByInnb(DataMap paramMap);
|
||||
|
||||
DataMap selectBOStoreInfoInqire(BOItrntMssageVO boItrntMssageVO);
|
||||
|
||||
List<DataMap> selectBOItrntMssagePassivSndngImgPopupForm(BOItrntMssageFileVO boItrntMssageFileVO);
|
||||
|
||||
Integer insertBOIntrntSndngImg(BOItrntMssageFileVO vo);
|
||||
|
||||
List<DataMap> selectBORegistMssagePopup(BOItrntMssageAlbumVO vo);
|
||||
|
||||
List<DataMap> selectBOAlbumCtgy(BOItrntMssageAlbumVO vo);
|
||||
|
||||
|
||||
int insertBOMssageAditRegist(BOItrntMssageAlbumVO vo);
|
||||
|
||||
int updateBOMssageAditUpdt(BOItrntMssageAlbumVO vo);
|
||||
|
||||
int deleteBOMssageAdit(BOItrntMssageAlbumVO vo);
|
||||
|
||||
int deleteBOMssageAditCtgy(BOItrntMssageAlbumVO vo);
|
||||
|
||||
DataMap selectBOShopNb(BOItrntMssageVO vo);
|
||||
|
||||
Integer selectBOItrntMbrListTotCnt(BOItrntMbrSrchVO vo);
|
||||
|
||||
List<DataMap> selectBOItrntMbrListInqire(BOItrntMbrSrchVO vo);
|
||||
|
||||
/**
|
||||
* 매장정보 조회
|
||||
* @param bOMssageSrchVO
|
||||
* @return
|
||||
*/
|
||||
List<DataMap> selectBOItrntMssageStrList(BOItrntMssageSrchVO bOMssageSrchVO);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntMssageAlbumVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 앨범 시퀀스 번호 */
|
||||
private Integer smsAlbumInnb;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 카테고리 */
|
||||
private String category;
|
||||
/** 메세지 */
|
||||
private String msg;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.sql.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntMssageFileVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* FM_INTRANET_SMS_FILE 매장 SMS 첨부파일
|
||||
*/
|
||||
|
||||
/** 고유번호 */
|
||||
private BigInteger fSeq;
|
||||
/** 매장 고유번호 */
|
||||
private BigInteger providerSeq;
|
||||
/** 파일순번 */
|
||||
private BigDecimal fIdx;
|
||||
/** 원래파일명 */
|
||||
private String fNameOrg;
|
||||
/** 저장파일명 */
|
||||
private String fName;
|
||||
/** 파일용량 */
|
||||
private Integer fSize;
|
||||
/** 넓이 */
|
||||
private Integer fWidth;
|
||||
/** 높이 */
|
||||
private Integer fHeight;
|
||||
/** 파일타입 */
|
||||
private String fType;
|
||||
/** 파일경로*/
|
||||
private String fCourse;
|
||||
/** 등록일 */
|
||||
private Date fRegdate;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
|
||||
/** 파일정보 */
|
||||
private List<HashMap<String, Object>> fileInfo;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntMssageSrchVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**검색어타입*/
|
||||
public String srchType;
|
||||
/**검색어*/
|
||||
public String srchStr;
|
||||
/**쇼핑몰코드*/
|
||||
private String sopmalCd;
|
||||
/**검색 등록자 구분 */
|
||||
private String srchRegusrDv;
|
||||
/**발송 상태*/
|
||||
private String srchSndngSttus;
|
||||
/**발송 종류*/
|
||||
private String srchSndngTy;
|
||||
/**검색 시작 주문 금액 날짜 */
|
||||
private String srchStrtSndngDt;
|
||||
/**검색 종료 주문 금액 날짜 */
|
||||
private String srchEndSndngDt ;
|
||||
/**검색 쇼핑몰 코드*/
|
||||
private String srchSopmalCd;
|
||||
/**검색 발송 조회 기간 구분*/
|
||||
private String srchDtDv;
|
||||
/**검색 발송번호*/
|
||||
private String sndngNb;
|
||||
/** 검색 SMS 발송 고유번호*/
|
||||
private String srchSmsInnb ;
|
||||
/** 검색 SMS 발송 대상 고유번호*/
|
||||
private String srchSmsToInnb ;
|
||||
/** 검색 발송 식별번호 */
|
||||
private Integer srchSndngIdnb;
|
||||
/** 검색 수신번호*/
|
||||
private String srchRecptnNb ;
|
||||
/**검색 수신/발신 번호 구분 */
|
||||
private String srchNbDv;
|
||||
/**검색 발송유형 */
|
||||
private List<String> srchDv;
|
||||
/**검색 현재상태*/
|
||||
private List<String> srchSttus;
|
||||
|
||||
/** 검색 회원번호 */
|
||||
private String srchMbrInnb;
|
||||
|
||||
/** 검색 매장번호 */
|
||||
private BigInteger srchStrInnb;
|
||||
|
||||
/** 암호화 키 */
|
||||
private String secretKey;
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntMssageVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** SMS 고유번호 */
|
||||
private BigInteger smsInnb;
|
||||
|
||||
/**
|
||||
* FM_SMS SMS 발송내역(메시지 발송내역)
|
||||
*/
|
||||
/** (STO:매장, ADM:관리자, SYS:시스템) */
|
||||
private String regusrDv;
|
||||
/** 매장 고유번호 */
|
||||
private BigInteger strInnb;
|
||||
/** 매장명 */
|
||||
private String strNm;
|
||||
/** 매장구분(G:가맹, J:직영, O:유통) */
|
||||
private String strDv;
|
||||
/** 문자상태(REG:등록, WAIT:대기 ,SEND:발송, END:발송완료) */
|
||||
private String chrSttus;
|
||||
/** 예약일시 */
|
||||
private Date resveDt;
|
||||
/** 발송일시 */
|
||||
private Date sndngDt;
|
||||
/** 발송 식별번호 */
|
||||
private BigInteger sndngIdnb;
|
||||
/** HEAD */
|
||||
private String head;
|
||||
/** 내용 */
|
||||
private String cn;
|
||||
/** TAIL */
|
||||
private String tail;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 발송번호 */
|
||||
private String sndngNb;
|
||||
/** (SMS,LMS,MMS) */
|
||||
private String dv;
|
||||
/** 대상자 수 */
|
||||
private Integer trgterCnt;
|
||||
/** 불량 수 */
|
||||
private Integer badnCnt;
|
||||
/** 대기 수 */
|
||||
private Integer waitCnt;
|
||||
/** (미확인+실패+성공) */
|
||||
private Integer trnsmisCnt;
|
||||
/** 실패 수 */
|
||||
private Integer failrCnt;
|
||||
/** (과금 대상) */
|
||||
private Integer succesCnt;
|
||||
/** 정산 식별번호 */
|
||||
private Integer stlIdnb;
|
||||
/** SMS 이름 */
|
||||
private String smsNm;
|
||||
/** 등록자 이름*/
|
||||
private String regusrNm;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* FM_SMS_TO SMS 대상(메시지 대상)
|
||||
*/
|
||||
/** SMS 대상 고유번호 */
|
||||
private BigInteger smsToInnb;
|
||||
/** 구분 */
|
||||
// private String dv;
|
||||
/** 상태 */
|
||||
private String sttus;
|
||||
/** 발송 식별번호 */
|
||||
// private long sndngIdnb;
|
||||
/** 발송일시 */
|
||||
// private Date sndngDt;
|
||||
/** 결과코드 */
|
||||
private String rsltCd;
|
||||
/** 수신번호 */
|
||||
private String recptnNb;
|
||||
/** 고객 식별번호 */
|
||||
private BigInteger cstmrIdnb;
|
||||
/** 고객이름 */
|
||||
private String cstmrNm;
|
||||
/** 치환 단어1 */
|
||||
private String substWrd1;
|
||||
/** 치환 단어2 */
|
||||
private String substWrd2;
|
||||
/** 치환 단어3 */
|
||||
private String substWrd3;
|
||||
/** 치환 단어4 */
|
||||
private String substWrd4;
|
||||
/** 치환 단어5 */
|
||||
private String substWrd5;
|
||||
|
||||
/** 치환 데이터 */
|
||||
private String substData;
|
||||
|
||||
/** 파일정보 */
|
||||
private List<HashMap<String, Object>> fileInfo;
|
||||
|
||||
/** 파일 고유번호*/
|
||||
private Integer fSeq;
|
||||
|
||||
/**
|
||||
* FM_SMS_FILE SMS 첨부파일
|
||||
*/
|
||||
/** sms 첨부파일 고유번호*/
|
||||
private BigInteger smsFileInnb;
|
||||
/** sms 고유번호 */
|
||||
// private String smsInnb;
|
||||
/** sms 쇼핑몰코드*/
|
||||
// private String sopmalCd;
|
||||
/** 첨부 순서*/
|
||||
private BigDecimal atchOrdr;
|
||||
/** 매장고유번호*/
|
||||
// private String strInnb;
|
||||
/** 파일경로 */
|
||||
private String filCours;
|
||||
/** 원 파일명 */
|
||||
private String orginlFilNm;
|
||||
/** 시스템 파일명 */
|
||||
private String sysFilNm;
|
||||
/** 파일용량 */
|
||||
private Integer filMg;
|
||||
/** 파일타입 */
|
||||
private String filTy;
|
||||
|
||||
/**
|
||||
* 사이트 구분 코드 테이블 매칭 X
|
||||
*/
|
||||
private String siteDvCd;
|
||||
|
||||
/** 메시지 대상자 리스트 */
|
||||
private String recptnTrgtList;
|
||||
|
||||
|
||||
/**
|
||||
* 자동발송용 필드
|
||||
*/
|
||||
/** 자동 발송 대상 리스트 */
|
||||
private String atmcList;
|
||||
|
||||
/* 암호화 키 */
|
||||
private String secretKey;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntSendVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** SMS 고유번호 */
|
||||
private BigInteger sendInnb;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 법인코드 */
|
||||
private String crpCd;
|
||||
/** 등록자구분 */
|
||||
private String regusrDv;
|
||||
/** 문자상태(REG:등록, WAIT:대기 ,SEND:발송, END:발송완료) */
|
||||
private String chrSttus;
|
||||
/** 예약일시 */
|
||||
private Date resveDt;
|
||||
/** 발송일시 */
|
||||
private Date sndngDt;
|
||||
/** 발송 식별번호 */
|
||||
private BigInteger sndngIdnb;
|
||||
/** 내용 */
|
||||
private String cn;
|
||||
/** 회신 내용 */
|
||||
private String rtnCn;
|
||||
/** 발송번호 */
|
||||
private String sndngNb;
|
||||
/** (SMS,LMS,MMS) */
|
||||
private String dv;
|
||||
/** 발송그룹 코드 */
|
||||
private String sendCd;
|
||||
/** 발송구분코드 */
|
||||
private String sendTypeCd;
|
||||
/** 쇼핑몰 */
|
||||
private String mallList;
|
||||
/** 시작일 */
|
||||
private Date startDt;
|
||||
/** 종료일 */
|
||||
private Date endDt;
|
||||
|
||||
/** 대상자 수 */
|
||||
private Integer trgterCnt;
|
||||
/** 불량 수 */
|
||||
private Integer badnCnt;
|
||||
/** 대기 수 */
|
||||
private Integer waitCnt;
|
||||
/** (미확인+실패+성공) */
|
||||
private Integer trnsmisCnt;
|
||||
/** 실패 수 */
|
||||
private Integer failrCnt;
|
||||
/** (과금 대상) */
|
||||
private Integer succesCnt;
|
||||
/** 수신동의수 */
|
||||
private Integer agreCnt;
|
||||
/** 정산 식별번호 */
|
||||
private Integer stlIdnb;
|
||||
/** SMS 이름 */
|
||||
private String smsNm;
|
||||
|
||||
|
||||
/**
|
||||
* GC_SEND_TO SMS 대상(메시지 대상)
|
||||
*/
|
||||
/** SMS 대상 고유번호 */
|
||||
private BigInteger smsToInnb;
|
||||
/** SMS 고유번호 */
|
||||
private BigInteger smsInnb;
|
||||
/** 코드 */
|
||||
private String code;
|
||||
|
||||
/** 상태 */
|
||||
private String sttus;
|
||||
|
||||
/** 결과코드 */
|
||||
private String rsltCd;
|
||||
/** 수신번호 */
|
||||
private String recptnNb;
|
||||
/** 고객 식별번호 */
|
||||
private BigInteger cstmrIdnb;
|
||||
/** 고객이름 */
|
||||
private String cstmrNm;
|
||||
/** 쇼핑몰 */
|
||||
private String mall;
|
||||
/** 주문코유번호 */
|
||||
private String ordrInnb;
|
||||
|
||||
/** 주문일시 */
|
||||
private Date ordrDt;
|
||||
/** 출고일시 */
|
||||
private Date dlivyDt;
|
||||
/** 동의상태 */
|
||||
private String agreSttus;
|
||||
/** 동의일시*/
|
||||
private Date agreDt;
|
||||
|
||||
/** 치환 데이터 */
|
||||
private String substData;
|
||||
|
||||
|
||||
/********************************************
|
||||
* 기본 값
|
||||
* *****************************************/
|
||||
/*매장고유번호*/
|
||||
private String strInnb;
|
||||
/*시크릿키*/
|
||||
private String secretKey;
|
||||
/**매장코드 */
|
||||
private String storeCode;
|
||||
|
||||
|
||||
/********************************************
|
||||
*포스 문자발송 추가
|
||||
*******************************************/
|
||||
|
||||
/*성별*/
|
||||
private String sex;
|
||||
|
||||
/*생년*/
|
||||
private String birthYear;
|
||||
|
||||
/*생월*/
|
||||
private String birthMonth;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.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 ItrntMssageAlbumVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 앨범 시퀀스 번호 */
|
||||
private Integer smsAlbumInnb;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 카테고리 */
|
||||
@NotBlank(message = "카테고리")
|
||||
private String category;
|
||||
/** 메세지 */
|
||||
@NotBlank(message = "메세지")
|
||||
private String msg;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntMssageFileVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* FM_INTRANET_SMS_FILE 매장 SMS 첨부파일
|
||||
*/
|
||||
|
||||
/** 고유번호 */
|
||||
private BigInteger fSeq;
|
||||
/** 매장 고유번호 */
|
||||
private BigInteger providerSeq;
|
||||
/** 파일순번 */
|
||||
private BigDecimal fIdx;
|
||||
/** 원래파일명 */
|
||||
private String fNameOrg;
|
||||
/** 저장파일명 */
|
||||
private String fName;
|
||||
/** 파일용량 */
|
||||
private Integer fSize;
|
||||
/** 넓이 */
|
||||
private Integer fWidth;
|
||||
/** 높이 */
|
||||
private Integer fHeight;
|
||||
/** 파일타입 */
|
||||
private String fType;
|
||||
/** 파일경로*/
|
||||
private String fCourse;
|
||||
/** 등록일 */
|
||||
private Date fRegdate;
|
||||
|
||||
/** 파일정보 */
|
||||
private List<HashMap<String, Object>> fileInfo;
|
||||
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.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 ItrntMssageSrchVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**검색어타입*/
|
||||
public String srchType;
|
||||
/**검색어*/
|
||||
public String srchStr;
|
||||
/**쇼핑몰코드*/
|
||||
private String sopmalCd;
|
||||
/**검색 시작 발송 날짜 */
|
||||
private String srchStrtSndngDt;
|
||||
/**검색 종료 발송 날짜 */
|
||||
private String srchEndSndngDt ;
|
||||
/**검색 쇼핑몰 코드*/
|
||||
private String srchSopmalCd;
|
||||
/**검색 sms 고유번호 */
|
||||
private String srchSmsInnb ;
|
||||
/**검색 sms 대상 고유번호 */
|
||||
private String srchSmsToInnb;
|
||||
/**검색 sms 수신번호 */
|
||||
private String srchRecptnNb ;
|
||||
/**검색 수신/발신 번호 구분 */
|
||||
private String srchNbDv ;
|
||||
/**검색 조회기간 구분 */
|
||||
private String srchDtDv ;
|
||||
/**검색 발송유형 */
|
||||
private List<String> srchDv;
|
||||
/**검색 현재상태*/
|
||||
private List<String> srchSttus;
|
||||
|
||||
/** 검색 회원번호 */
|
||||
private String srchMbrInnb;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntMssageVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** SMS 고유번호 */
|
||||
private Integer smsInnb;
|
||||
|
||||
/**
|
||||
* FM_SMS SMS 발송내역(메시지 발송내역)
|
||||
*/
|
||||
/** (STO:매장, ADM:관리자, SYS:시스템) */
|
||||
private String regusrDv;
|
||||
/** 매장 고유번호 */
|
||||
private Integer strInnb;
|
||||
/** 입점사명 */
|
||||
private String strNm;
|
||||
/** 매장구분(G:가맹, J:직영, O:유통) */
|
||||
private String strDv;
|
||||
/** 문자상태(REG:등록, WAIT:대기 ,SEND:발송, END:발송완료) */
|
||||
private String chrSttus;
|
||||
/** 예약일시 */
|
||||
private Date resveDt;
|
||||
/** 발송일시 */
|
||||
private Date sndngDt;
|
||||
/** 발송 식별번호 */
|
||||
private Integer sndngIdnb;
|
||||
/** HEAD */
|
||||
private String head;
|
||||
/** 내용 */
|
||||
private String cn;
|
||||
/** TAIL */
|
||||
private String tail;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 발송번호 */
|
||||
private String sndngNb;
|
||||
/** (SMS,LMS,MMS) */
|
||||
private String dv;
|
||||
/** 대상자 수 */
|
||||
private Integer trgterCnt;
|
||||
/** 불량 수 */
|
||||
private Integer badnCnt;
|
||||
/** 대기 수 */
|
||||
private Integer waitCnt;
|
||||
/** (미확인+실패+성공) */
|
||||
private Integer trnsmisCnt;
|
||||
/** 실패 수 */
|
||||
private Integer failrCnt;
|
||||
/** (과금 대상) */
|
||||
private Integer succesCnt;
|
||||
/** 정산 식별번호 */
|
||||
private Integer stlIdnb;
|
||||
/** SMS 이름 */
|
||||
private String smsNm;
|
||||
/** 등록자 이름*/
|
||||
private String regusrNm;
|
||||
|
||||
|
||||
/**
|
||||
* FM_SMS_TO SMS 대상(메시지 대상)
|
||||
*/
|
||||
/** 대상 순번 */
|
||||
private Integer trgetSnb;
|
||||
/** 구분 */
|
||||
// private String dv;
|
||||
/** 상태 */
|
||||
private String sttus;
|
||||
/** 발송 식별번호 */
|
||||
// private long sndngIdnb;
|
||||
/** 발송일시 */
|
||||
// private Date sndngDt;
|
||||
/** 결과코드 */
|
||||
private String rsltCd;
|
||||
/** 수신번호 */
|
||||
@NotEmpty(message = "수신번호")
|
||||
private String recptnNb;
|
||||
/** 고객 식별번호 */
|
||||
private Integer cstmrIdnb;
|
||||
/** 고객이름 */
|
||||
private String cstmrNm;
|
||||
/** 치환 단어1 */
|
||||
private String substWrd1;
|
||||
/** 치환 단어2 */
|
||||
private String substWrd2;
|
||||
/** 치환 단어3 */
|
||||
private String substWrd3;
|
||||
/** 치환 단어4 */
|
||||
private String substWrd4;
|
||||
/** 치환 단어5 */
|
||||
private String substWrd5;
|
||||
|
||||
/** 치환 데이터 */
|
||||
private DataMap sndngData;
|
||||
|
||||
|
||||
/** 메시지 대상자 리스트 */
|
||||
private String recptnTrgtList;
|
||||
|
||||
/**
|
||||
* 회원 목록 -> 메시지 발송
|
||||
*/
|
||||
/** 발송 건수 */
|
||||
private String sndngCnt;
|
||||
/** 회원 정보 */
|
||||
private String mbrInfo;
|
||||
|
||||
/** 파일정보 */
|
||||
private List<HashMap<String, Object>> fileInfo;
|
||||
|
||||
|
||||
/** 파일 고유번호*/
|
||||
private Integer fSeq;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.mssage.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntSendVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** SMS 고유번호 */
|
||||
private BigInteger sendInnb;
|
||||
/** 쇼핑몰코드 */
|
||||
private String sopmalCd;
|
||||
/** 법인코드 */
|
||||
private String crpCd;
|
||||
/** 등록자구분 */
|
||||
private String regusrDv;
|
||||
/** 문자상태(REG:등록, WAIT:대기 ,SEND:발송, END:발송완료) */
|
||||
private String chrSttus;
|
||||
/** 예약일시 */
|
||||
private Date resveDt;
|
||||
/** 발송일시 */
|
||||
private Date sndngDt;
|
||||
/** 발송 식별번호 */
|
||||
private BigInteger sndngIdnb;
|
||||
/** 내용 */
|
||||
private String cn;
|
||||
/** 회신 내용 */
|
||||
private String rtnCn;
|
||||
/** 발송번호 */
|
||||
private String sndngNb;
|
||||
/** (SMS,LMS,MMS) */
|
||||
private String dv;
|
||||
/** 발송그룹 코드 */
|
||||
private String sendCd;
|
||||
/** 발송구분코드 */
|
||||
private String sendTypeCd;
|
||||
/** 쇼핑몰 */
|
||||
private String mallList;
|
||||
/** 시작일 */
|
||||
private Date startDt;
|
||||
/** 종료일 */
|
||||
private Date endDt;
|
||||
|
||||
/** 대상자 수 */
|
||||
private Integer trgterCnt;
|
||||
/** 불량 수 */
|
||||
private Integer badnCnt;
|
||||
/** 대기 수 */
|
||||
private Integer waitCnt;
|
||||
/** (미확인+실패+성공) */
|
||||
private Integer trnsmisCnt;
|
||||
/** 실패 수 */
|
||||
private Integer failrCnt;
|
||||
/** (과금 대상) */
|
||||
private Integer succesCnt;
|
||||
/** 수신동의수 */
|
||||
private Integer agreCnt;
|
||||
/** 정산 식별번호 */
|
||||
private Integer stlIdnb;
|
||||
/** SMS 이름 */
|
||||
private String smsNm;
|
||||
|
||||
|
||||
/**
|
||||
* GC_SEND_TO SMS 대상(메시지 대상)
|
||||
*/
|
||||
/** SMS 대상 고유번호 */
|
||||
private BigInteger smsToInnb;
|
||||
/** SMS 고유번호 */
|
||||
private BigInteger smsInnb;
|
||||
/** 코드 */
|
||||
private String code;
|
||||
|
||||
/** 상태 */
|
||||
private String sttus;
|
||||
|
||||
/** 결과코드 */
|
||||
private String rsltCd;
|
||||
/** 수신번호 */
|
||||
private String recptnNb;
|
||||
/** 고객 식별번호 */
|
||||
private BigInteger cstmrIdnb;
|
||||
/** 고객이름 */
|
||||
private String cstmrNm;
|
||||
/** 쇼핑몰 */
|
||||
private String mall;
|
||||
/** 주문코유번호 */
|
||||
private String ordrInnb;
|
||||
|
||||
/** 주문일시 */
|
||||
private Date ordrDt;
|
||||
/** 출고일시 */
|
||||
private Date dlivyDt;
|
||||
/** 동의상태 */
|
||||
private String agreSttus;
|
||||
/** 동의일시*/
|
||||
private Date agreDt;
|
||||
|
||||
/** 치환 데이터 */
|
||||
private String substData;
|
||||
|
||||
|
||||
/********************************************
|
||||
* 기본 값
|
||||
* *****************************************/
|
||||
/*매장고유번호*/
|
||||
private String strInnb;
|
||||
/*시크릿키*/
|
||||
private String secretKey;
|
||||
/**매장코드 */
|
||||
private String storeCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.stl.controller;
|
||||
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||
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.itrnt.mbr.service.BOItrntMbrService;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntMbrSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.stl.service.BOItrntStlMssageService;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.stl.vo.BOItrntStlMssageVO;
|
||||
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.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.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* 인트라넷 관리자
|
||||
* @author 추지훈
|
||||
* @since 2024-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-05 추지훈 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/itrnt/ntcn/stl")
|
||||
public class BOItrntStlMssageController {
|
||||
|
||||
@Autowired
|
||||
private BOItrntStlMssageService service;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
@Autowired
|
||||
private BOItrntMbrService boItrntMbrService;
|
||||
|
||||
/*************************************
|
||||
정산
|
||||
*************************************/
|
||||
|
||||
/**
|
||||
* 정산 목록 조회 폼
|
||||
* @param vo(mbrInnb)
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntStlMssageListRForm")
|
||||
public ResponseEntity<?> selectBOItrntStlMssageListRForm(@RequestBody BOItrntStlMssageVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("02".equals(user.getTentGroup())){
|
||||
vo.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
}
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
//매장 구분 코드
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("STR_DV");
|
||||
List<?> strDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("strDv", strDv);
|
||||
|
||||
bOMaComncdVO.setGroupCd("REGUSR_DV");
|
||||
List<?> regusrDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("regusrDv", regusrDv);
|
||||
|
||||
List<DataMap> storeList = service.selectBOStoreList(vo);
|
||||
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("boItrntStlMssageVO", vo);
|
||||
content.put("tentGroup",user.getTentGroup());
|
||||
content.put("storeList", storeList);
|
||||
|
||||
//현재 년도
|
||||
int currentYear = Calendar.getInstance().get(Calendar.YEAR);
|
||||
content.put("currentYear", currentYear);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 목록 조회
|
||||
*
|
||||
* @param vo(mbrInnb)
|
||||
* @return ResponseEntity<?>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntStlMssageList")
|
||||
public ResponseEntity<?> selectBOItrntStlMssageList(@RequestBody BOItrntStlMssageVO vo) {
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("02".equals(user.getTentGroup())){
|
||||
vo.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
}
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//리셀러 여부 o
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||
// List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("strInfo", service.selectBOItrntStlMssageCharge(vo));
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.stl.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.stl.vo.ItrntStlMssageVO;
|
||||
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.SendToResrc;
|
||||
import com.wb.domainserver.util.file.service.FileStorageService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequestMapping("/itrnt/ntcn/stl")
|
||||
public class ItrntStlMssageController {
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
|
||||
/*****************************************************
|
||||
정산 START
|
||||
*****************************************************/
|
||||
|
||||
/**
|
||||
* 정산 조회 폼
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectItrntStlMssageListRForm")
|
||||
public String selectItrntStlMssageListRForm(ModelMap model, ItrntStlMssageVO vo,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/stl/selectBOItrntStlMssageListRForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/ntcn/stl/ItrntStlMssageListRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 정산 목록 조회
|
||||
*
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectItrntStlMssageList")
|
||||
public String selectItrntStlMssageList(ModelMap model, ItrntStlMssageVO vo,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/ntcn/stl/selectBOItrntStlMssageList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
model.addAttribute("pageUnit",vo.getPageUnit());
|
||||
return "itrnt/ntcn/stl/ItrntStlMssageListR";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.stl.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.stl.vo.BOItrntStlMssageVO;
|
||||
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 BOItrntStlMssageMapper {
|
||||
|
||||
/**
|
||||
* 매장 목록 조회
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<DataMap> selectBOItrntStoreList(BOItrntStlMssageVO vo);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.stl.service;
|
||||
|
||||
import com.wb.domainserver.common.prop.PropertyService;
|
||||
import com.wb.domainserver.domain.itrnt.mbr.vo.BOItrntMbrSrchVO;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.stl.mapper.BOItrntStlMssageMapper;
|
||||
import com.wb.domainserver.domain.itrnt.ntcn.stl.vo.BOItrntStlMssageVO;
|
||||
import com.wb.domainserver.domain.sure.mapper.SureMapper;
|
||||
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.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.YearMonth;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BOItrntStlMssageService {
|
||||
|
||||
@Autowired
|
||||
private BOItrntStlMssageMapper mapper;
|
||||
|
||||
@Autowired
|
||||
private SureMapper sureMapper;
|
||||
|
||||
@Autowired
|
||||
private PropertyService propertyService;
|
||||
|
||||
/**
|
||||
* 매장목록 조회
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOStoreList(BOItrntStlMssageVO vo) {
|
||||
|
||||
|
||||
// 매장 목록 조회
|
||||
List<DataMap> storeList = mapper.selectBOItrntStoreList(vo);
|
||||
|
||||
return storeList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 정산 내역 조회
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntStlMssageCharge(BOItrntStlMssageVO vo) {
|
||||
|
||||
DataMap stlInfo = new DataMap();
|
||||
|
||||
//정산 대상 조회
|
||||
List<DataMap> stlMssageChargeList = sureMapper.selectBOItrntStlMssageChargeList(vo);
|
||||
|
||||
//매장정보 조회
|
||||
List<DataMap> storeList = mapper.selectBOItrntStoreList(vo);
|
||||
|
||||
vo.getPaginationInfo().setTotalRecordCount(stlMssageChargeList.size());
|
||||
|
||||
int totSmsCnt = 0;
|
||||
int totLmsCnt = 0;
|
||||
int totMmsCnt = 0;
|
||||
int totAtCnt = 0;
|
||||
int totFtCnt = 0;
|
||||
int totFtiCnt = 0;
|
||||
BigDecimal totSumCost = BigDecimal.ZERO;;
|
||||
|
||||
for(DataMap stlMap : stlMssageChargeList) {
|
||||
|
||||
BigDecimal smsCost = BigDecimal.ZERO;
|
||||
BigDecimal lmsCost = BigDecimal.ZERO;
|
||||
BigDecimal mmsCost = BigDecimal.ZERO;
|
||||
BigDecimal atCost = BigDecimal.ZERO;
|
||||
BigDecimal ftCost = BigDecimal.ZERO;
|
||||
BigDecimal ftiCost = BigDecimal.ZERO;
|
||||
|
||||
BigDecimal totCost = BigDecimal.ZERO;
|
||||
|
||||
String regusr = StringUtil.isNullToString(stlMap.get("regusr"));
|
||||
int index = regusr.indexOf(":");
|
||||
|
||||
if(index > 0) {
|
||||
String[] etc1Ex = regusr.split(":");
|
||||
String regusrDv = etc1Ex[0];
|
||||
String strInnb = etc1Ex[1];
|
||||
|
||||
|
||||
for(DataMap store : storeList) {
|
||||
String strInnStr = StringUtil.isNullToString(store.get("strInnb"));
|
||||
if(strInnStr.equals(strInnb)) {
|
||||
stlMap.put("regusr", store.get("tentcpnNm"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 입력 받은 연도와 월로 YearMonth 객체 생성
|
||||
YearMonth inputDate = YearMonth.of(Integer.parseInt(vo.getSrchYear()), 1);
|
||||
|
||||
//이전 조건 날짜
|
||||
YearMonth comparisonDate = YearMonth.of(2022, 1);
|
||||
|
||||
//기존
|
||||
if(inputDate.isBefore(comparisonDate)) {
|
||||
smsCost = smsCost.add(objNumToBigDecimal(stlMap.get("sms")).multiply(BigDecimal.valueOf(7.4)));
|
||||
lmsCost = lmsCost.add(objNumToBigDecimal(stlMap.get("lms")).multiply(BigDecimal.valueOf(23)));
|
||||
mmsCost = mmsCost.add(objNumToBigDecimal(stlMap.get("mms")).multiply(BigDecimal.valueOf(50)));
|
||||
atCost = atCost.add(objNumToBigDecimal(stlMap.get("at")).multiply(BigDecimal.valueOf(4.5)));
|
||||
ftCost = ftCost.add(objNumToBigDecimal(stlMap.get("ft")).multiply(BigDecimal.valueOf(9.6)));
|
||||
ftiCost = ftiCost.add(objNumToBigDecimal(stlMap.get("fti")).multiply(BigDecimal.valueOf(15.6)));
|
||||
} else {
|
||||
|
||||
//신규 22년 1월 부터 인하
|
||||
smsCost = smsCost.add(objNumToBigDecimal(stlMap.get("sms")).multiply(BigDecimal.valueOf(7.2)));
|
||||
lmsCost = lmsCost.add(objNumToBigDecimal(stlMap.get("lms")).multiply(BigDecimal.valueOf(23)));
|
||||
mmsCost = mmsCost.add(objNumToBigDecimal(stlMap.get("mms")).multiply(BigDecimal.valueOf(45.2)));
|
||||
atCost = atCost.add(objNumToBigDecimal(stlMap.get("at")).multiply(BigDecimal.valueOf(3.9)));
|
||||
ftCost = ftCost.add(objNumToBigDecimal(stlMap.get("ft")).multiply(BigDecimal.valueOf(9.6)));
|
||||
ftiCost = ftiCost.add(objNumToBigDecimal(stlMap.get("fti")).multiply(BigDecimal.valueOf(15.6)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//등록 매장별 총합계
|
||||
totCost = totCost.add(smsCost).add(lmsCost).add(mmsCost).add(atCost).add(ftCost);
|
||||
//총금액
|
||||
totSumCost = totSumCost.add(totCost);
|
||||
|
||||
totSmsCnt += Integer.parseInt(StringUtil.isNullToString(stlMap.get("sms")));
|
||||
totLmsCnt += Integer.parseInt(StringUtil.isNullToString(stlMap.get("lms")));
|
||||
totMmsCnt += Integer.parseInt(StringUtil.isNullToString(stlMap.get("mms")));
|
||||
totAtCnt += Integer.parseInt(StringUtil.isNullToString(stlMap.get("at")));
|
||||
totFtCnt += Integer.parseInt(StringUtil.isNullToString(stlMap.get("ft")));
|
||||
totFtiCnt += Integer.parseInt(StringUtil.isNullToString(stlMap.get("fti")));
|
||||
|
||||
stlMap.put("smsCost", smsCost);
|
||||
stlMap.put("lmsCost", lmsCost);
|
||||
stlMap.put("mmsCost", mmsCost);
|
||||
stlMap.put("atCost", atCost);
|
||||
stlMap.put("ftCost", ftCost);
|
||||
stlMap.put("ftiCost", ftiCost);
|
||||
stlMap.put("totCost", totCost);
|
||||
|
||||
}
|
||||
|
||||
|
||||
stlInfo.put("totSmsCnt", totSmsCnt);
|
||||
stlInfo.put("totLmsCnt", totLmsCnt);
|
||||
stlInfo.put("totMmsCnt", totMmsCnt);
|
||||
stlInfo.put("totAtCnt", totAtCnt);
|
||||
stlInfo.put("totFtCnt", totFtCnt);
|
||||
stlInfo.put("totFtiCnt", totFtiCnt);
|
||||
stlInfo.put("totSumCost", totSumCost);
|
||||
stlInfo.put("chargeList", stlMssageChargeList);
|
||||
|
||||
return stlInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 객체가 null 인지 확인하고 null 인 경우 0, 아니면 BigDecimal 숫자 리턴
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal objNumToBigDecimal(Object object) {
|
||||
BigDecimal decimal = BigDecimal.ZERO;
|
||||
if (object == null) {
|
||||
return decimal;
|
||||
} else if (object instanceof BigDecimal bigDecimal){
|
||||
return bigDecimal;
|
||||
} else {
|
||||
return BigDecimal.valueOf((Integer) object);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.stl.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntStlMssageVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 매장 번호 */
|
||||
private String strInnb;
|
||||
|
||||
/** 등록자 구분 */
|
||||
private String regusrDv;
|
||||
|
||||
/** 매장 구분 */
|
||||
private String strDv;
|
||||
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
|
||||
/** 연도 */
|
||||
private String srchYear;
|
||||
|
||||
/** 월 */
|
||||
private String srchMnt;
|
||||
|
||||
/** 법인 구분 */
|
||||
private String srchCrp;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.wb.domainserver.domain.itrnt.ntcn.stl.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntStlMssageVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/** 매장 번호 */
|
||||
private String strInnb;
|
||||
|
||||
/** 등록자 구분 */
|
||||
private String regusrDv;
|
||||
|
||||
/** 매장 구분 */
|
||||
private String strDv;
|
||||
|
||||
/** 연도 */
|
||||
private String srchYear;
|
||||
|
||||
/** 월 */
|
||||
private String srchMnt;
|
||||
|
||||
/** 조회 법인 */
|
||||
private String srchCrp;
|
||||
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.wb.domainserver.domain.itrnt.sel.controller;
|
||||
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.itrnt.sel.service.BOItrntSelService;
|
||||
import com.wb.domainserver.domain.itrnt.sel.vo.BOItrntSelVO;
|
||||
import com.wb.domainserver.response.ApiResponse;
|
||||
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.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.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 인트라넷 판매분석
|
||||
* @author 이운산
|
||||
* @since 2024-04-21
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-04-21 이운산 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/gcone/itrnt/sel")
|
||||
public class BOItrntSelController {
|
||||
|
||||
@Autowired
|
||||
private BOItrntSelService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/**
|
||||
* 인트라넷 판매분석 조회
|
||||
* @param itrntSelVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntSel")
|
||||
public ResponseEntity<?> selectBOItrntDailySelng(@RequestBody BOItrntSelVO itrntSelVO) {
|
||||
|
||||
List<DataMap> result = service.selectBOItrntSel(itrntSelVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
DataMap content = new DataMap();
|
||||
content.put("result", result);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.wb.domainserver.domain.itrnt.sel.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.sel.vo.ItrntSelVO;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* 인트라넷 판매분석 Controller
|
||||
*
|
||||
* @author 이운산
|
||||
* @since 2024-03-19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-03-19 이운산 최초 생성, Sleanl -> Sel 명칭 변경
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/sel")
|
||||
@Slf4j
|
||||
public class ItrntSelController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/**
|
||||
* 일별판매분석
|
||||
* @param ItrntSelVO
|
||||
* @return DailySelR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectDailySel")
|
||||
public String selectDailySel(ItrntSelVO itrntSelVO, Model model) {
|
||||
|
||||
// ReplyFromResrc reply = sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/sel/selectBOItrntSel", itrntSelVO);
|
||||
|
||||
return "itrnt/sel/DailySelR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 주간 판매 조회 페이지 이동
|
||||
* @param ItrntSelVO
|
||||
* @return WklySelR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectWklySel")
|
||||
public String selectWklySel(ItrntSelVO itrntSelVO, Model model) {
|
||||
|
||||
//ReplyFromResrc reply = sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/selectBOItrntSel", itrntSelngVO);
|
||||
|
||||
return "itrnt/sel/WklySelR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 월간 판매 조회 페이지 이동
|
||||
* @param ItrntSelVO
|
||||
* @return MnthlySelR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMnthlySel")
|
||||
public String selectMnthlySel(ItrntSelVO itrntSelVO, Model model) {
|
||||
|
||||
//ReplyFromResrc reply = sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/selectBOItrntSel", itrntSelngVO);
|
||||
|
||||
return "itrnt/sel/MnthlySelR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 판매 상품 순위 조회 페이지 이동
|
||||
* @param ItrntSelVO
|
||||
* @return SelGoodsRankR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectSelGoodsRank")
|
||||
public String selectSelGoodsRank(ItrntSelVO itrntSelVO, Model model) {
|
||||
|
||||
//ReplyFromResrc reply = sendToResrc.ofPost(RESRC.GCONEBO, "/itrnt/selectBOWklySelng", itrntSelngVO);
|
||||
|
||||
return "itrnt/sel/SelGoodsRankR";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.wb.domainserver.domain.itrnt.sel.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.sel.vo.BOItrntSelVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntSelMapper {
|
||||
|
||||
/**
|
||||
* 인트라넷 판매분석 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntSel(BOItrntSelVO itrntSelVO);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.wb.domainserver.domain.itrnt.sel.service;
|
||||
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.sel.mapper.BOItrntSelMapper;
|
||||
import com.wb.domainserver.domain.itrnt.sel.vo.BOItrntSelVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BOItrntSelService {
|
||||
|
||||
@Autowired
|
||||
private BOItrntSelMapper mapper;
|
||||
|
||||
/**
|
||||
* 인트라넷 판매분석 조회
|
||||
*
|
||||
* @param itrntSelVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntSel(BOItrntSelVO itrntSelVO) {
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
|
||||
//판매분석
|
||||
resultList = mapper.selectBOItrntSel(itrntSelVO);
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.wb.domainserver.domain.itrnt.sel.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntSelVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 매장 번호*/
|
||||
private String providerSeq;
|
||||
|
||||
/** 연도 */
|
||||
private String year;
|
||||
|
||||
/** 월 */
|
||||
private String month;
|
||||
|
||||
/** 사이트 타입 */
|
||||
private String siteType;
|
||||
|
||||
/** 조회 시작일자 */
|
||||
private String sdate;
|
||||
|
||||
/** 조회 종료일자 */
|
||||
private String edate;
|
||||
|
||||
/** 데이터 타입 */
|
||||
private String dataType;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.wb.domainserver.domain.itrnt.sel.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 인트라넷 판매분석 VO
|
||||
*
|
||||
* @author 이운산
|
||||
* @since 2024-03-19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-03-19 이운산 최초 생성, Sleanl -> Sel 명칭 변경
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntSelVO extends AbstractVO {
|
||||
|
||||
/** 매장 번호*/
|
||||
private String providerSeq;
|
||||
|
||||
/** 연도 */
|
||||
private String year;
|
||||
|
||||
/** 월 */
|
||||
private String month;
|
||||
|
||||
/** 사이트 타입 */
|
||||
private String siteType;
|
||||
|
||||
/** 조회 시작일자 */
|
||||
private String sdate;
|
||||
|
||||
/** 조회 종료일자 */
|
||||
private String edate;
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.wb.domainserver.domain.itrnt.selng.controller;
|
||||
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.itrnt.selng.service.BOItrntSelngService;
|
||||
import com.wb.domainserver.domain.itrnt.selng.vo.BOItrntSelngVO;
|
||||
import com.wb.domainserver.response.ApiResponse;
|
||||
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.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.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 인트라넷 매출분석
|
||||
* @author 이운산
|
||||
* @since 2024-04-03
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-04-03 이운산 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/gcone/itrnt/selng")
|
||||
public class BOItrntSelngController {
|
||||
|
||||
@Autowired
|
||||
private BOItrntSelngService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 일별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntDailySelng")
|
||||
public ResponseEntity<?> selectBOItrntDailySelng(@RequestBody BOItrntSelngVO itrntSelngVO) {
|
||||
|
||||
DataMap result = service.selectBOItrntDailySelng(itrntSelngVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
DataMap content = new DataMap();
|
||||
content.put("result", result);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 주별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntWklySelng")
|
||||
public ResponseEntity<?> selectBOItrntWklySelng(@RequestBody BOItrntSelngVO itrntSelngVO) {
|
||||
|
||||
DataMap result = service.selectBOItrntWklySelng(itrntSelngVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
DataMap content = new DataMap();
|
||||
content.put("result", result);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 월별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntMnthlySelng")
|
||||
public ResponseEntity<?> selectBOItrntMnthlySelng(@RequestBody BOItrntSelngVO itrntSelngVO) {
|
||||
|
||||
List<DataMap> result = service.selectBOItrntMnthlySelng(itrntSelngVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
DataMap content = new DataMap();
|
||||
content.put("result", result);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 입점사별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOItrntStrSelng")
|
||||
public ResponseEntity<?> selectBOItrntStrSelng(@RequestBody BOItrntSelngVO itrntSelngVO) {
|
||||
|
||||
//입점사별 통계 조회
|
||||
List<DataMap> resultStrSelng = service.selectBOItrntStrSelng(itrntSelngVO);
|
||||
|
||||
//반품 환불 목록
|
||||
List<DataMap> resultRefund = service.selectBOItrntRefund(itrntSelngVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
DataMap content = new DataMap();
|
||||
|
||||
content.put("resultStrSelng", resultStrSelng);
|
||||
content.put("resultRefund", resultRefund);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.wb.domainserver.domain.itrnt.selng.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.selng.vo.ItrntSelngVO;
|
||||
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.SendToResrc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 Controller
|
||||
*
|
||||
* @author 이운산
|
||||
* @since 2024-03-11
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-03-11 이운산 최초 생성
|
||||
* 2024-03-19 이운산 Selnganl -> Selng 명칭 변경
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/selng")
|
||||
@Slf4j
|
||||
public class ItrntSelngController {
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/**
|
||||
* 일별 매출 조회 페이지 이동
|
||||
* @param ItrntSelngVO
|
||||
* @return DailySelngR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectDailySelng")
|
||||
public String selectDailySelng(ItrntSelngVO itrntSelngVO, ModelMap model){
|
||||
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/selng/selectBOItrntDailySelng", itrntSelngVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/selng/DailySelngR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 주별 매출 조회 페이지 이동
|
||||
* @param ItrntSelngVO
|
||||
* @return WklySelngR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectWklySelng")
|
||||
public String selectWklySelng(ItrntSelngVO itrntSelngVO, ModelMap model){
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/selng/selectBOItrntWklySelng", itrntSelngVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/selng/WklySelngR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 월별 매출 조회 페이지 이동
|
||||
* @param ItrntSelngVO
|
||||
* @return MnthlySelngR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMnthlySelng")
|
||||
public String selectMnthlySelng(ItrntSelngVO itrntSelngVO, ModelMap model){
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/selng/selectBOItrntMnthlySelng", itrntSelngVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/selng/MnthlySelngR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 월별 매출 조회 페이지 이동
|
||||
* @param ItrntSelngVO
|
||||
* @return StrSelngR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectStrSelng")
|
||||
public String selectStrSelng(ItrntSelngVO itrntSelngVO, ModelMap model){
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/selng/selectBOItrntStrSelng", itrntSelngVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
return "itrnt/selng/StrSelngR";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.wb.domainserver.domain.itrnt.selng.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.selng.vo.BOItrntSelngVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntSelngMapper {
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 일별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntDailySelng(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 일별 구매 수량
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntDailyGoodsEa(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 일별 환불 금액
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntDailyRefund(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 주별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntWklySelng(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 주별 구매 수량
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntWklyGoodsEa(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 주별 환불 수량
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntWklyRefund(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 월별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntMnthlySelng(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 월별 구매 수량
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntMnthlyGoodsEa(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
/**
|
||||
* 월별 환불 수량
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntMnthlyRefund(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 입점사별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntStrSelng(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 반품 환불 목록
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntRefund(BOItrntSelngVO itrntSelngVO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.wb.domainserver.domain.itrnt.selng.service;
|
||||
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.selng.mapper.BOItrntSelngMapper;
|
||||
import com.wb.domainserver.domain.itrnt.selng.vo.BOItrntSelngVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BOItrntSelngService {
|
||||
|
||||
@Autowired
|
||||
private BOItrntSelngMapper mapper;
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 일별 통계 조회
|
||||
*
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntDailySelng(BOItrntSelngVO itrntSelngVO) {
|
||||
DataMap resultMap = new DataMap();
|
||||
|
||||
//일별 매출 조회
|
||||
List<DataMap> resultList = mapper.selectBOItrntDailySelng(itrntSelngVO);
|
||||
|
||||
//일별 구매 수량
|
||||
DataMap dailyGoodsEaMap = mapper.selectBOItrntDailyGoodsEa(itrntSelngVO);
|
||||
//일별 환불 금액
|
||||
DataMap dailyRefund = mapper.selectBOItrntDailyRefund(itrntSelngVO);
|
||||
|
||||
resultMap.put("resultList", resultList);
|
||||
resultMap.put("dailyGoodsEaMap", dailyGoodsEaMap);
|
||||
resultMap.put("dailyRefund", dailyRefund);
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 주별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOItrntWklySelng(BOItrntSelngVO itrntSelngVO) {
|
||||
DataMap resultMap = new DataMap();
|
||||
|
||||
//주별 매출 조회
|
||||
List<DataMap> resultList = mapper.selectBOItrntWklySelng(itrntSelngVO);
|
||||
//일별 구매 수량
|
||||
DataMap wklyGoodsEaMap = mapper.selectBOItrntWklyGoodsEa(itrntSelngVO);
|
||||
//일별 환불 금액
|
||||
DataMap wklyRefund = mapper.selectBOItrntWklyRefund(itrntSelngVO);
|
||||
|
||||
resultMap.put("resultList", resultList);
|
||||
resultMap.put("wklyGoodsEaMap", wklyGoodsEaMap);
|
||||
resultMap.put("wklyRefund", wklyRefund);
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 월별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntMnthlySelng(BOItrntSelngVO itrntSelngVO) {
|
||||
DataMap resultMap = new DataMap();
|
||||
|
||||
//월별 매출 조회
|
||||
List<DataMap> resultList = mapper.selectBOItrntMnthlySelng(itrntSelngVO);
|
||||
//월별 구매 수량
|
||||
DataMap mnthlyGoodsEaMap = mapper.selectBOItrntMnthlyGoodsEa(itrntSelngVO);
|
||||
//월별 환불 금액
|
||||
DataMap mnthlyRefund = mapper.selectBOItrntMnthlyRefund(itrntSelngVO);
|
||||
|
||||
resultMap.put("resultList", resultList);
|
||||
resultMap.put("mnthlyGoodsEaMap", mnthlyGoodsEaMap);
|
||||
resultMap.put("mnthlyRefund", mnthlyRefund);
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 입점사별 통계 조회
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntStrSelng(BOItrntSelngVO itrntSelngVO) {
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
|
||||
resultList = mapper.selectBOItrntStrSelng(itrntSelngVO);
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 반품 환불 목록
|
||||
* @param itrntSelngVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOItrntRefund(BOItrntSelngVO itrntSelngVO) {
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
|
||||
resultList = mapper.selectBOItrntRefund(itrntSelngVO);
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.wb.domainserver.domain.itrnt.selng.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntSelngVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 매장 번호*/
|
||||
private String providerSeq;
|
||||
|
||||
/** 연도 */
|
||||
private String year;
|
||||
|
||||
/** 월 */
|
||||
private String month;
|
||||
|
||||
/** 사이트 타입 */
|
||||
private String siteType;
|
||||
|
||||
/** 조회 시작일자 */
|
||||
private String sdate;
|
||||
|
||||
/** 조회 종료일자 */
|
||||
private String edate;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.wb.domainserver.domain.itrnt.selng.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 인트라넷 매출분석 VO
|
||||
*
|
||||
* @author 이운산
|
||||
* @since 2024-03-19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-03-11 이운산 최초 생성
|
||||
* 2024-03-19 이운산 Selnganl -> Selng 명칭 변
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntSelngVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 매장 번호*/
|
||||
private String providerSeq;
|
||||
|
||||
/** 연도 */
|
||||
private String year;
|
||||
|
||||
/** 월 */
|
||||
private String month;
|
||||
|
||||
/** 사이트 타입 */
|
||||
private String siteType;
|
||||
|
||||
/** 조회 시작일자 */
|
||||
private String sdate;
|
||||
|
||||
/** 조회 종료일자 */
|
||||
private String edate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.wb.domainserver.domain.itrnt.sms.controller;
|
||||
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/sms")
|
||||
public class ItrntSmsController {
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSmsSndngDtls")
|
||||
public String selectSmsSndngDtls() {
|
||||
|
||||
return "/itrnt/sms/SmsSndngDtlsR";
|
||||
}
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectSmsStlDtls")
|
||||
public String selectSmsStlDtls() {
|
||||
|
||||
return "/itrnt/sms/SmsStlDtlsR";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.wb.domainserver.domain.itrnt.sms.vo;
|
||||
|
||||
public class ItrntSmsVO {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.wb.domainserver.domain.itrnt.stock.controller;
|
||||
|
||||
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.itrnt.stock.service.BOItrntStockService;
|
||||
import com.wb.domainserver.domain.itrnt.stock.vo.BOItrntStockVO;
|
||||
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.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/gcone/itrnt/stock")
|
||||
public class BOItrntStockController {
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private BOItrntStockService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
/**
|
||||
* 재고관리
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/selectBOStockList")
|
||||
public ResponseEntity<?> selectBOStockList(@RequestBody BOItrntStockVO vo) {
|
||||
DataMap content = new DataMap();
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||
vo.setTentGroup(user.getTentGroup());
|
||||
vo.setReprsntBrand(user.getReprsntBrand());
|
||||
//재고데이터
|
||||
BOItrntStockVO strInfo = new BOItrntStockVO();
|
||||
if ("01".equals(user.getTentGroup()) && vo.getSrchGoodsPosHdqrtrsCd() == null) {//본사이고, 검색할포스본부코드 없을 시
|
||||
vo.setSrchGoodsPosHdqrtrsCd("E07");
|
||||
} else {//매장일경우 매장 정보 GET
|
||||
strInfo = service.selectBOStrInfo(vo);
|
||||
if(StringUtil.isEmpty(vo.getSrchStrPosCd())){//최초 검색일 시
|
||||
if (vo.getSrchGoodsPosHdqrtrsCd() == null) {
|
||||
vo.setSrchGoodsPosHdqrtrsCd(strInfo.getGoodsPosHdqrtrsCd());
|
||||
}
|
||||
}
|
||||
vo.setGoodsPosHdqrtrsCd(strInfo.getGoodsPosHdqrtrsCd());
|
||||
vo.setStrPosCd(strInfo.getStrPosCd());
|
||||
}
|
||||
|
||||
//공통 코드(POS본부코드)
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("POS_HDQRTRS");
|
||||
List<?> posHdqrtrsList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
log.debug("vo {}", vo);
|
||||
Map<String, Object> stockData = new HashMap<>();
|
||||
stockData = service.selectBOStockInfo(vo);
|
||||
|
||||
content.put("stockData", stockData);
|
||||
content.put("strInfo", strInfo);
|
||||
content.put("posHdqrtrsList", posHdqrtrsList);
|
||||
content.put("vo", vo);
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.wb.domainserver.domain.itrnt.stock.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.itrnt.stock.vo.ItrntStockVO;
|
||||
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.SendToResrc;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/itrnt/stock")
|
||||
public class ItrntStockController {
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
/**
|
||||
* 재고관리 화면
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectStockIngire")
|
||||
public String selectStockIngire(ModelMap model, ItrntStockVO vo) {
|
||||
/*매장 재고 가져오기*/
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/itrnt/stock/selectBOStockList",vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
return "itrnt/stock/StockManageR";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.wb.domainserver.domain.itrnt.stock.mapper;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.stock.vo.BOItrntStockVO;
|
||||
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 BOItrntStockMapper {
|
||||
//상품 분류 조회
|
||||
List<DataMap> selectBOGoodsItm(BOItrntStockVO vo);
|
||||
|
||||
//해당 매장 정보
|
||||
BOItrntStockVO selectBOStrInfo(BOItrntStockVO vo);
|
||||
|
||||
//재고 조회
|
||||
List<DataMap> selectBOStockList(BOItrntStockVO vo);
|
||||
|
||||
//상품 리스트 조회
|
||||
List<DataMap> selectBOGoodsList(BOItrntStockVO vo);
|
||||
|
||||
//매장 목록 조회
|
||||
List<DataMap> selectBOStrList(BOItrntStockVO vo);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.wb.domainserver.domain.itrnt.stock.service;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.wb.domainserver.domain.itrnt.stock.mapper.BOItrntStockMapper;
|
||||
import com.wb.domainserver.domain.itrnt.stock.vo.BOItrntStockVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BOItrntStockService {
|
||||
@Autowired
|
||||
private BOItrntStockMapper mapper;
|
||||
|
||||
/* 매장 정보
|
||||
*
|
||||
* */
|
||||
public BOItrntStockVO selectBOStrInfo(BOItrntStockVO vo) {
|
||||
BOItrntStockVO strInfo = new BOItrntStockVO();
|
||||
strInfo = mapper.selectBOStrInfo(vo);
|
||||
return strInfo;
|
||||
}
|
||||
|
||||
/* 매장 재고 데이터 조회
|
||||
*
|
||||
* */
|
||||
public Map<String, Object> selectBOStockInfo(BOItrntStockVO vo) {
|
||||
//매장 리스트
|
||||
List<DataMap> strList = new ArrayList<>();
|
||||
strList = mapper.selectBOStrList(vo);
|
||||
|
||||
//상품 분류
|
||||
List<DataMap> itmList = new ArrayList<>();
|
||||
itmList = mapper.selectBOGoodsItm(vo);
|
||||
|
||||
|
||||
//대분류
|
||||
List<DataMap> itm_1_List = new ArrayList<>();
|
||||
itm_1_List = itmList.stream()
|
||||
.filter(data -> "000".equals(data.get("grpCd2")))
|
||||
.filter(data -> "000".equals(data.get("grpCd3")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//중분류
|
||||
List<DataMap> itm_2_List = new ArrayList<>();
|
||||
itm_2_List = itmList.stream()
|
||||
.filter(data -> "000".equals(data.get("grpCd3")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//소분류
|
||||
List<DataMap> itm_3_List = new ArrayList<>();
|
||||
itm_3_List = itmList.stream()
|
||||
.filter(data -> !"000".equals(data.get("grpCd1")))
|
||||
.filter(data -> !"000".equals(data.get("grpCd2")))
|
||||
.filter(data -> !"000".equals(data.get("grpCd3")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//상품리스트
|
||||
List<DataMap> goodsList = new ArrayList<>();
|
||||
goodsList = mapper.selectBOGoodsList(vo);
|
||||
|
||||
//재고리스트
|
||||
List<DataMap> stockList = new ArrayList<>();
|
||||
stockList = mapper.selectBOStockList(vo);
|
||||
|
||||
Map<String, Map<String, Map<String, Object>>> data = new HashMap<>();
|
||||
for (DataMap row : stockList) {
|
||||
String itmId = row.get("goodsIdntfcCd").toString();
|
||||
String strCd = row.get("strIdntfcCd").toString();
|
||||
String grpcd = row.get("goodsClCd").toString();
|
||||
|
||||
Map<String, Object> itemData = new HashMap<>();
|
||||
itemData.put("grpcd", grpcd);
|
||||
itemData.put("grpcd_1", grpcd.substring(0, 3));
|
||||
itemData.put("grpcd_2", grpcd.substring(3, 6));
|
||||
itemData.put("grpcd_3", grpcd.substring(6, 9));
|
||||
itemData.put("invntryQy", row.get("invntryQy"));
|
||||
itemData.put("sleQy", row.get("sleQy"));
|
||||
itemData.put("pdAvrgQy", row.get("pdAvrgQy"));
|
||||
|
||||
int qty = Integer.parseInt(row.get("invntryQy").toString());
|
||||
int avg = Integer.parseInt(row.get("pdAvrgQy").toString());
|
||||
itemData.put("status", qty >= avg ? "plus" : "minus");
|
||||
|
||||
data.computeIfAbsent(itmId, k -> new HashMap<>()).put(strCd, itemData);
|
||||
}
|
||||
Map<String, Object> stockData = new HashMap<>();
|
||||
stockData.put("stockList",stockList);
|
||||
stockData.put("strList",strList);
|
||||
stockData.put("itmList",itmList);
|
||||
stockData.put("itm_1_List",itm_1_List);
|
||||
stockData.put("itm_2_List",itm_2_List);
|
||||
stockData.put("itm_3_List",itm_3_List);
|
||||
stockData.put("data",data);
|
||||
stockData.put("goodsList",goodsList);
|
||||
stockData.put("itm_1_json",new Gson().toJson(itm_1_List));
|
||||
stockData.put("itm_2_json",new Gson().toJson(itm_2_List));
|
||||
stockData.put("itm_3_json",new Gson().toJson(itm_3_List));
|
||||
stockData.put("str_json",new Gson().toJson(strList));
|
||||
stockData.put("goods_json",new Gson().toJson(goodsList));
|
||||
|
||||
return stockData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.wb.domainserver.domain.itrnt.stock.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntStockVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
//매장고유번호
|
||||
private String strInnb;
|
||||
//상품포스본부코드
|
||||
private String goodsPosHdqrtrsCd;
|
||||
//상품포스본부코드
|
||||
private String srchGoodsPosHdqrtrsCd;
|
||||
//매장포스코드
|
||||
private String strPosCd;
|
||||
//매장포스코드
|
||||
private String srchStrPosCd;
|
||||
//tent그룹
|
||||
private String tentGroup;
|
||||
//브랜드
|
||||
private String reprsntBrand;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.wb.domainserver.domain.itrnt.stock.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ItrntStockVO extends AbstractVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
//매장고유번호
|
||||
private String strInnb;
|
||||
//상품포스본부코드
|
||||
private String goodsPosHdqrtrsCd;
|
||||
//상품포스본부코드
|
||||
private String srchGoodsPosHdqrtrsCd;
|
||||
//매장포스코드
|
||||
private String strPosCd;
|
||||
//매장포스코드
|
||||
private String srchStrPosCd;
|
||||
//tent그룹
|
||||
private String tentGroup;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
package com.wb.domainserver.domain.itrnt.str.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.itrnt.str.service.BOItrntStrService;
|
||||
import com.wb.domainserver.domain.itrnt.str.vo.BOItrntStrVO;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/itrnt/str")
|
||||
public class BOItrntStrController {
|
||||
|
||||
@Autowired
|
||||
private BOItrntStrService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
|
||||
/**
|
||||
* 매장 안내
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOStrGuidance")
|
||||
public ResponseEntity<?> selectBOStrGuidance (@RequestBody BOItrntStrVO itrntStrVO) {
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
itrntStrVO.setSopmalCd(user.getSopmalCd()); // 쇼핑몰코드
|
||||
|
||||
// service 호출
|
||||
Map<String, Object> contents = new HashMap<>();
|
||||
contents = service.selectBOStrGuidance(itrntStrVO);
|
||||
|
||||
return ApiResponse.of(contents).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장 목록 검색 폼 이동
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOStrListForm")
|
||||
public ResponseEntity<?> selectBOStrListForm (@RequestBody BOItrntStrVO itrntStrVO) {
|
||||
Map<String, Object> contents = new HashMap<>();
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SIDO"); // 시도 코드
|
||||
List<?> sidoCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
contents.put("sidoCdList", sidoCdList);
|
||||
bOMaComncdVO.setGroupCd("GUNGU"); // 군구 코드
|
||||
List<?> gunguCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
contents.put("gunguCdList", gunguCdList);
|
||||
|
||||
|
||||
contents.put("paramVO", itrntStrVO);
|
||||
|
||||
return ApiResponse.of(contents).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* 매장 시도, 군구 공통 코드 반환
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selecBOSidoGunguCmmnCdArray")
|
||||
public ResponseEntity<?> selecBOSidoGunguCmmnCdArray(@RequestBody BOItrntStrVO itrntStrVO) {
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
itrntStrVO.setSopmalCd(user.getSopmalCd()); // 쇼핑몰코드
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SIDO"); // 시도 코드
|
||||
List<?> sidoCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
bOMaComncdVO.setGroupCd("GUNGU"); // 군구 코드
|
||||
List<?> gunguCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("sidoCdList", sidoCdList);
|
||||
content.put("gunguCdList", gunguCdList);
|
||||
|
||||
return ApiResponse.of(content).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장 목록 조회
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOStrListInqire")
|
||||
public ResponseEntity<?> selectBOStrListInqire (@RequestBody BOItrntStrVO itrntStrVO) {
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
itrntStrVO.setSopmalCd(user.getSopmalCd()); // 쇼핑몰코드
|
||||
|
||||
Map<String, Object> contents = new HashMap<>();
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(itrntStrVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(itrntStrVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
itrntStrVO.setPaginationInfo(paginationInfo);
|
||||
itrntStrVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
itrntStrVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
itrntStrVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<DataMap> resultList = service.selectBOStrListInqire(itrntStrVO);
|
||||
|
||||
contents.put("paramVO", itrntStrVO);
|
||||
contents.put("resultList", resultList);
|
||||
contents.put("paginationInfo", itrntStrVO.getPaginationInfo());
|
||||
|
||||
return ApiResponse.of(contents).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장 상세 조회
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOStrDtlInqire")
|
||||
public ResponseEntity<?> selectBOStrDtlInqire (@RequestBody BOItrntStrVO itrntStrVO) {
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
itrntStrVO.setSopmalCd(user.getSopmalCd()); // 쇼핑몰코드
|
||||
|
||||
Map<String, Object> contents = new HashMap<>();
|
||||
DataMap result = service.selectBOStrDtlInqire(itrntStrVO);
|
||||
|
||||
contents.put("paramVO", itrntStrVO);
|
||||
contents.put("result", result);
|
||||
|
||||
return ApiResponse.of(contents).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장 상세 수정
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateBOStrDtlInfoUpdt")
|
||||
public ResponseEntity<?> updateBOStrDtlInfoUpdt(@RequestBody BOItrntStrVO itrntStrVO) {
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
itrntStrVO.setSopmalCd(user.getSopmalCd()); // 쇼핑몰코드
|
||||
itrntStrVO.setUpdusr(user.getUserInnb()); // 수정자
|
||||
|
||||
// service 호출
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.updateBOStrDtlInfoUpdt(itrntStrVO);
|
||||
|
||||
return ApiResponse.of(message).ifPresentOrElse(HttpStatus.OK, HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.wb.domainserver.domain.itrnt.str.controller;
|
||||
|
||||
public class ItrnStrController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.wb.domainserver.domain.itrnt.str.mapper;
|
||||
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.str.vo.BOItrntStrVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BOItrntStrMapper {
|
||||
|
||||
/**
|
||||
* 인트라넷 매장 수정
|
||||
* @param itrntStrVO
|
||||
*/
|
||||
public void updateBOStrDtlInfoUpdt(BOItrntStrVO itrntStrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 매장안내 > 시/군 그룹 조회
|
||||
* @param itrntStrVO
|
||||
*/
|
||||
public List<BOItrntStrVO> selectBOStrListCtyGroup(BOItrntStrVO itrntStrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 매장 목록 조회
|
||||
* @param itrntStrVO
|
||||
*/
|
||||
public List<DataMap> selectBOStrListInqire(BOItrntStrVO itrntStrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 매장 상세 조회
|
||||
* @param itrntStrVO
|
||||
*/
|
||||
public DataMap selectBOStrDtlInqire(BOItrntStrVO itrntStrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 매장 안내 건수 조회
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
public Integer selectBOStrListCnt(BOItrntStrVO itrntStrVO);
|
||||
|
||||
|
||||
/**
|
||||
* 군/구 별 목록 조회
|
||||
* @param itrntStrVO
|
||||
*/
|
||||
public List<DataMap> selectBOStrListGunGuGroup(BOItrntStrVO itrntStrVO);
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.wb.domainserver.domain.itrnt.str.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.wb.domainserver.domain.itrnt.str.mapper.BOItrntStrMapper;
|
||||
import com.wb.domainserver.domain.itrnt.str.vo.BOItrntStrVO;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
*
|
||||
* 인트라넷 매장
|
||||
* @author 추지훈
|
||||
* @since 2024-02-05
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-02-05 추지훈 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BOItrntStrService {
|
||||
|
||||
@Autowired
|
||||
private BOItrntStrMapper mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 매장 상세 수정
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> updateBOStrDtlInfoUpdt(BOItrntStrVO itrntStrVO) {
|
||||
log.debug(" : {}", itrntStrVO);
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
|
||||
try {
|
||||
// mapper 호출
|
||||
mapper.updateBOStrDtlInfoUpdt(itrntStrVO);
|
||||
//message.put("innb", itrntStrVO);
|
||||
message.put("result", "success");
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장 안내
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> selectBOStrGuidance(BOItrntStrVO itrntStrVO) {
|
||||
Map<String, Object> contents = new HashMap<>();
|
||||
|
||||
log.debug("itrntStrVO is {}", itrntStrVO);
|
||||
|
||||
List<BOItrntStrVO> resultGroupList = null;
|
||||
|
||||
resultGroupList = mapper.selectBOStrListCtyGroup(itrntStrVO);
|
||||
|
||||
List<DataMap> resultList = null;
|
||||
resultList = mapper.selectBOStrListGunGuGroup(itrntStrVO);
|
||||
|
||||
contents.put("resultGroupList", resultGroupList);
|
||||
contents.put("resultList", resultList);
|
||||
contents.put("resultCnt", resultList.size());
|
||||
|
||||
return contents;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장 목록 조회
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
public List<DataMap> selectBOStrListInqire(BOItrntStrVO itrntStrVO) {
|
||||
log.debug("itrntStrVO is {}", itrntStrVO);
|
||||
List<DataMap> resultList = null;
|
||||
// 목록 건수
|
||||
Integer totCnt = mapper.selectBOStrListCnt(itrntStrVO);
|
||||
log.debug("totCnt is {}", totCnt);
|
||||
|
||||
itrntStrVO.getPaginationInfo().setTotalRecordCount(totCnt);
|
||||
if(totCnt > 0 ) {
|
||||
resultList = mapper.selectBOStrListInqire(itrntStrVO);
|
||||
}
|
||||
log.debug("resultList is {}", resultList);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 매장 상세 조회
|
||||
* @param itrntStrVO
|
||||
* @return
|
||||
*/
|
||||
public DataMap selectBOStrDtlInqire(BOItrntStrVO itrntStrVO) {
|
||||
log.debug(" : {}", itrntStrVO);
|
||||
DataMap result = new DataMap();
|
||||
|
||||
// mapper 호출
|
||||
result = mapper.selectBOStrDtlInqire(itrntStrVO);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.wb.domainserver.domain.itrnt.str.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 인트라넷 매장
|
||||
* @author 추지훈
|
||||
* @since 2024-03-11
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* == (Modification Information) == 개정이력
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2024-03-11 추지훈. 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOItrntStrVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
|
||||
/** 매장 고유번호 */
|
||||
private Integer strInnb;
|
||||
|
||||
/**
|
||||
* 검색_매장검색어 - 매장명
|
||||
*/
|
||||
private String srchKeyword;
|
||||
|
||||
/**
|
||||
* 검색_시, 도
|
||||
*/
|
||||
private String srchCtyDo;
|
||||
|
||||
/**
|
||||
* 검색_군, 구
|
||||
*/
|
||||
private String srchCtyGunGu;
|
||||
|
||||
|
||||
private String ctyDo;
|
||||
|
||||
private String strCount;
|
||||
|
||||
private String ctyGunGu;
|
||||
|
||||
/*대표브랜드*/
|
||||
private String reprsntBrand;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.wb.domainserver.domain.itrnt.str.vo;
|
||||
|
||||
public class ItrntStrVO {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user