fo bo 머지작업(admin)
This commit is contained in:
@@ -1,20 +1,38 @@
|
|||||||
package com.wb.domainserver.domain.admin.instcSle.mtng.controller;
|
package com.wb.domainserver.domain.admin.instcSle.mtng.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.instcSle.mtng.service.BOMaMtngService;
|
||||||
|
import com.wb.domainserver.domain.admin.instcSle.mtng.vo.BOMaMtngSrchVO;
|
||||||
|
import com.wb.domainserver.domain.admin.instcSle.mtng.vo.BOMaMtngVO;
|
||||||
import com.wb.domainserver.domain.admin.instcSle.mtng.vo.MaMtngSrchVO;
|
import com.wb.domainserver.domain.admin.instcSle.mtng.vo.MaMtngSrchVO;
|
||||||
import com.wb.domainserver.domain.admin.instcSle.mtng.vo.MaMtngVO;
|
import com.wb.domainserver.domain.admin.instcSle.mtng.vo.MaMtngVO;
|
||||||
|
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.service.BOMbrService;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrAppnVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -58,56 +76,138 @@ public class MaMtngController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaMtngService service;
|
||||||
|
@Autowired
|
||||||
|
private BOMbrService bombrService;
|
||||||
|
@Autowired
|
||||||
|
private BOMaSopmalService maSopmalService;
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService bOMaComncdService;
|
||||||
|
@Autowired
|
||||||
|
private BOCommonService boCommonService;
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOOrdrService boOrdrService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 부정판매 대상자 목록 조회
|
* 부정판매 대상자 목록 조회
|
||||||
* @param maMtngSrchVO
|
* @param boMaMtngSrchVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectItcSleMtngListInqireForm")
|
@RequestMapping("/selectItcSleMtngListInqireForm")
|
||||||
public String selectItcSleMtngListInqireForm(ModelMap model,MaMtngSrchVO maMtngSrchVO) {
|
public String selectItcSleMtngListInqireForm(ModelMap model, BOMaMtngSrchVO boMaMtngSrchVO) {
|
||||||
//BO에서 API 호출(부정 판매 대상자 검색 폼 코드 조회)
|
/*쇼핑몰*/
|
||||||
responseHandler.handleResponse(
|
List<DataMap> brand = new ArrayList<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngListInqireForm", maMtngSrchVO),
|
brand = maSopmalService.selectBOSopmalCdNm();
|
||||||
model,
|
|
||||||
"resultSrchMap"
|
/*리셀러지정구분*/
|
||||||
);
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||||
|
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
/*식별기준*/
|
||||||
|
bOMaComncdVO.setGroupCd("IDNTFC_STDR");
|
||||||
|
List<?> idntfcStdr = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
//브랜드
|
||||||
|
resultMap.put("brand",brand);
|
||||||
|
/*리셀러지정구분*/
|
||||||
|
resultMap.put("appen",appen);
|
||||||
|
/*식별기준*/
|
||||||
|
resultMap.put("idntfcStdr",idntfcStdr);
|
||||||
|
resultMap.put("boMaMtngSrchVO",boMaMtngSrchVO);
|
||||||
|
|
||||||
|
model.addAttribute("resultSrchMap", resultMap);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngListInqireForm", maMtngSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultSrchMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/instcSle/mtng/MaItcSleMtngListInqireRForm";
|
return "admin/instcSle/mtng/MaItcSleMtngListInqireRForm";
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 부정판매 대상자 목록 조회
|
* 부정판매 대상자 목록 조회
|
||||||
* @param maMtngSrchVO
|
* @param boMaMtngSrchVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectItcSleMtngListInqire", method = RequestMethod.POST)
|
@RequestMapping(value="/selectItcSleMtngListInqire", method = RequestMethod.POST)
|
||||||
public String selectItcSleMtngListInqire(ModelMap model,MaMtngSrchVO maMtngSrchVO) {
|
public String selectItcSleMtngListInqire(ModelMap model,BOMaMtngSrchVO boMaMtngSrchVO) {
|
||||||
//BO 회원 목록조회 API 호출
|
|
||||||
responseHandler.handleResponse(
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngListInqire", maMtngSrchVO),
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
model,
|
paginationInfo.setCurrentPageNo(boMaMtngSrchVO.getPageIndex());
|
||||||
"resultListMap"
|
paginationInfo.setRecordCountPerPage(boMaMtngSrchVO.getPageUnit());
|
||||||
);
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
model.addAttribute("mbrSrchVO", maMtngSrchVO);
|
boMaMtngSrchVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boMaMtngSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boMaMtngSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boMaMtngSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//시크릿키 set
|
||||||
|
boMaMtngSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||||
|
|
||||||
|
//부정 판매 대상자 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("paginationInfo", boMaMtngSrchVO.getPaginationInfo());
|
||||||
|
content.put("boMaMtngSrchVO",boMaMtngSrchVO);
|
||||||
|
content.put("resultMap", service.selectBOItcSleMtngListInqire(boMaMtngSrchVO));
|
||||||
|
|
||||||
|
model.addAttribute("resultListMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngListInqire", maMtngSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultListMap"
|
||||||
|
// );
|
||||||
|
model.addAttribute("mbrSrchVO", boMaMtngSrchVO);
|
||||||
return "admin/instcSle/mtng/MaItcSleMtngListInqireR";
|
return "admin/instcSle/mtng/MaItcSleMtngListInqireR";
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 엑셀 다운로드
|
* 엑셀 다운로드
|
||||||
* @param MaMtngSrchVO
|
* @param boMaMtngSrchVO
|
||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value="/selectItcSleMtngListExcelDwld" , method = RequestMethod.POST)
|
@RequestMapping(value="/selectItcSleMtngListExcelDwld" , method = RequestMethod.POST)
|
||||||
public void selectExcelList(MaMtngSrchVO maMtngSrchVO,HttpServletResponse response) {
|
public void selectExcelList(BOMaMtngSrchVO boMaMtngSrchVO,HttpServletResponse response) {
|
||||||
maMtngSrchVO.setPageIndex(1); //10000건까지 엑셀 출력
|
boMaMtngSrchVO.setPageIndex(1); //10000건까지 엑셀 출력
|
||||||
maMtngSrchVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
boMaMtngSrchVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
||||||
|
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngListInqire",maMtngSrchVO)
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
);
|
paginationInfo.setCurrentPageNo(boMaMtngSrchVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(boMaMtngSrchVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
boMaMtngSrchVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boMaMtngSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boMaMtngSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boMaMtngSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//시크릿키 set
|
||||||
|
boMaMtngSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||||
|
|
||||||
|
//부정 판매 대상자 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
resultMap.put("paginationInfo", boMaMtngSrchVO.getPaginationInfo());
|
||||||
|
resultMap.put("boMaMtngSrchVO",boMaMtngSrchVO);
|
||||||
|
resultMap.put("resultMap", service.selectBOItcSleMtngListInqire(boMaMtngSrchVO));
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngListInqire",maMtngSrchVO)
|
||||||
|
// );
|
||||||
|
|
||||||
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("resultMap");
|
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("resultMap");
|
||||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||||
@@ -149,30 +249,46 @@ public class MaMtngController {
|
|||||||
headerMap.put("registDt", "지정일");
|
headerMap.put("registDt", "지정일");
|
||||||
ExcelDownloadUtil.createExcel("injustice_seller_list_" + str, headerMap, dataList, response);
|
ExcelDownloadUtil.createExcel("injustice_seller_list_" + str, headerMap, dataList, response);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
|
log.error("엑셀다운로드 중 오류가 발생하였습니다.", ioe.getMessage());
|
||||||
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("엑셀다운로드 중 오류가 발생하였습니다.", e);
|
log.error("엑셀다운로드 중 오류가 발생하였습니다.", e.getMessage());
|
||||||
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 부정판매 대상자 상세 조회
|
* 부정판매 대상자 상세 조회
|
||||||
* @param MaMtngSrchVO
|
* @param boMaMtngVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectItcSleMtngDtlInqire")
|
@RequestMapping("/selectItcSleMtngDtlInqire")
|
||||||
public String selectItcSleMtngDtlInqire(ModelMap model, MaMtngVO maMtngVO) {
|
public String selectItcSleMtngDtlInqire(ModelMap model, BOMaMtngVO boMaMtngVO) {
|
||||||
log.info("부정판매 대상자 고유번호 확인 : {}", maMtngVO.getAppnInnb());
|
log.info("부정판매 대상자 고유번호 확인 : {}", boMaMtngVO.getAppnInnb());
|
||||||
//BO 회원 목록조회 API 호출
|
BOMbrVO mbrVO = new BOMbrVO();
|
||||||
responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngDtlInqire", maMtngVO),
|
DataMap resultData = new DataMap();
|
||||||
model,
|
/*회원고유번호*/
|
||||||
"resultFO1"
|
mbrVO.setMbrInnb(boMaMtngVO.getIdntfcInfo());
|
||||||
);
|
/*회원구분코드*/
|
||||||
model.addAttribute("maMtngSrchVO",maMtngVO);
|
mbrVO.setMbrDvCd(boMaMtngVO.getMbrDvCd());
|
||||||
|
/*쇼핑몰코드*/
|
||||||
|
mbrVO.setSopmalCd(boMaMtngVO.getSopmalCd());
|
||||||
|
resultData = bombrService.selectBOMbrInfoUpdtInqire(mbrVO);
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
content.put("mbrInfo", resultData);
|
||||||
|
|
||||||
|
model.addAttribute("resultFO1", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleMtngDtlInqire", maMtngVO),
|
||||||
|
// model,
|
||||||
|
// "resultFO1"
|
||||||
|
// );
|
||||||
|
model.addAttribute("maMtngSrchVO",boMaMtngVO);
|
||||||
return "admin/instcSle/mtng/MaItcSleMtngDtlInqireR";
|
return "admin/instcSle/mtng/MaItcSleMtngDtlInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,12 +298,39 @@ public class MaMtngController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectItcSleOrdrInfoInqire")
|
@RequestMapping("/selectItcSleOrdrInfoInqire")
|
||||||
public String selectItcSleOrdrInfoInqire(ModelMap model, MaMtngVO maMtngVO) {
|
public String selectItcSleOrdrInfoInqire(ModelMap model, BOMaMtngVO boMaMtngVO) {
|
||||||
responseHandler.handleResponse(
|
log.info("부정 판매 대상 param{} 주문 정보",boMaMtngVO.getIdntfcInfo());
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleOrdrInfoInqire", maMtngVO),
|
log.info("부정 판매 대상 param{} 주문 정보",boMaMtngVO.getMbrDvCd());
|
||||||
model,
|
Map<String, Object> content = new HashMap<>();
|
||||||
"resultFO2"
|
|
||||||
);
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(boMaMtngVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(boMaMtngVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
boMaMtngVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boMaMtngVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boMaMtngVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boMaMtngVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
List<DataMap> ordrInfo = new ArrayList<>();
|
||||||
|
ordrInfo = service.selectBOItcSleOrdrInfoInqire(boMaMtngVO);
|
||||||
|
|
||||||
|
//부정 판매 대상자 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
content.put("paginationInfo", boMaMtngVO.getPaginationInfo());
|
||||||
|
|
||||||
|
content.put("boMaMtngVO", boMaMtngVO);
|
||||||
|
|
||||||
|
content.put("ordrInfo", ordrInfo);
|
||||||
|
|
||||||
|
model.addAttribute("resultFO2", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleOrdrInfoInqire", maMtngVO),
|
||||||
|
// model,
|
||||||
|
// "resultFO2"
|
||||||
|
// );
|
||||||
return "admin/instcSle/mtng/MaItcSleOrdrInfoInqireR";
|
return "admin/instcSle/mtng/MaItcSleOrdrInfoInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,28 +340,79 @@ public class MaMtngController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectItcSleHistInfoInqire")
|
@RequestMapping("/selectItcSleHistInfoInqire")
|
||||||
public String selectItcSleHistInfoInqire(ModelMap model, MaMtngVO maMtngVO) {
|
public String selectItcSleHistInfoInqire(ModelMap model, BOMaMtngVO boMaMtngVO) {
|
||||||
responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleHistInfoInqire", maMtngVO),
|
log.debug("부정 판매 대상 지정 이력 정보 param{}",boMaMtngVO.getAppnInnb());
|
||||||
model,
|
Map<String, Object> content = new HashMap<>();
|
||||||
"resultFO3"
|
|
||||||
);
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(boMaMtngVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(boMaMtngVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
boMaMtngVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boMaMtngVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boMaMtngVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boMaMtngVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//부정 판매 대상자 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
content.put("paginationInfo", boMaMtngVO.getPaginationInfo());
|
||||||
|
|
||||||
|
content.put("histInfo", service.selectBOItcSleHistInfoInqire(boMaMtngVO));
|
||||||
|
|
||||||
|
content.put("boMaMtngVO", boMaMtngVO);
|
||||||
|
|
||||||
|
model.addAttribute("resultFO3", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/selectBOItcSleHistInfoInqire", maMtngVO),
|
||||||
|
// model,
|
||||||
|
// "resultFO3"
|
||||||
|
// );
|
||||||
return "admin/instcSle/mtng/MaItcSleHistInfoInqireR";
|
return "admin/instcSle/mtng/MaItcSleHistInfoInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 일반, 블랙리스트, 화이트리스트 변경.
|
* 일반, 블랙리스트, 화이트리스트 변경.
|
||||||
* @parmam maMtngVO
|
* @parmam boMbrAppnVO
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/updateMbrRslrList")
|
@RequestMapping(value="/updateMbrRslrList", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateMbrRslrList(ModelMap model, MaMtngVO maMtngVO) {
|
public ResponseEntity<WnbtResponse> updateMbrRslrList(ModelMap model, BOMbrAppnVO boMbrAppnVO) {
|
||||||
log.info("appnInnb is {}", maMtngVO.getAppnInnb());
|
log.info("appnInnb is {}", boMbrAppnVO.getAppnInnb());
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/updateBOMbrRslrList", maMtngVO),
|
log.info("updateBOMbrRslrList(boMbrAppnVO = {})", boMbrAppnVO.getAppnDvCd());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
// boMbrAppnVO.setRegusr(user.getUserInnb());
|
||||||
|
boMbrAppnVO.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
log.info("getId = {}", user.getId());
|
||||||
|
log.info("getUserInnb = {}", user.getUserInnb());
|
||||||
|
log.info("getMbrId = {}", user.getMbrId());
|
||||||
|
|
||||||
|
|
||||||
|
// if(StringUtil.isEmpty(boMbrAppnVO.getSopmalCd())){
|
||||||
|
// boMbrAppnVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
// }
|
||||||
|
String secretKey = boCommonService.selectSecretkey();
|
||||||
|
boMbrAppnVO.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
content = service.updateBOMbrRslrList(boMbrAppnVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/instcSle/mtng/updateBOMbrRslrList", maMtngVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,28 @@
|
|||||||
package com.wb.domainserver.domain.admin.ntcn.atmcsndng.controller;
|
package com.wb.domainserver.domain.admin.ntcn.atmcsndng.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.atmcsndng.service.BOMaAtmcSndngService;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.atmcsndng.vo.BOMaAtmcSndngVO;
|
||||||
import com.wb.domainserver.domain.admin.ntcn.atmcsndng.vo.MaAtmcSndngVO;
|
import com.wb.domainserver.domain.admin.ntcn.atmcsndng.vo.MaAtmcSndngVO;
|
||||||
import com.wb.domainserver.domain.mngr.ntcn.atmcsndng.vo.AtmcSndngVO;
|
import com.wb.domainserver.domain.mngr.ntcn.atmcsndng.vo.AtmcSndngVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.exception.code.ErrorCode;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
import com.wb.domainserver.util.string.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -22,6 +31,8 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,6 +68,9 @@ public class MaAtmcSndngController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaAtmcSndngService service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 자동 발송 관리 페이지
|
* 자동 발송 관리 페이지
|
||||||
* @return String
|
* @return String
|
||||||
@@ -74,15 +88,37 @@ public class MaAtmcSndngController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectAtmcSndngManageListInqire")
|
@RequestMapping(value = "/selectAtmcSndngManageListInqire")
|
||||||
public String selectAtmcSndngManageListInqire(MaAtmcSndngVO vo, ModelMap model) {
|
public String selectAtmcSndngManageListInqire(BOMaAtmcSndngVO vo, ModelMap model) {
|
||||||
|
|
||||||
log.debug("자동 발송 관리 진입 =>{}", vo);
|
log.debug("자동 발송 관리 진입 =>{}", vo);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/atmcsndng/selectBOAtmcSndngManageListInqire", vo)
|
|
||||||
);
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
vo.setFormDvCd("FORM_DV_");
|
||||||
|
|
||||||
|
//시스템 02
|
||||||
|
vo.setMngrDv("02");
|
||||||
|
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
//검색 폼 code
|
||||||
|
List<DataMap> sopmal = service.selectBOSopmalAtmcSndng();
|
||||||
|
resultMap.put("sopmal",sopmal);
|
||||||
|
//초기 쇼핑몰 코드 없을 경우 목록의 첫번째 입력
|
||||||
|
if("".equals(StringUtil.isNullToString(vo.getSopmalCd()))) {
|
||||||
|
vo.setSopmalCd(StringUtil.isNullToString(sopmal.get(0).get("sopmalCd")));
|
||||||
|
}
|
||||||
|
resultMap.put("bOAtmcSndngVO", vo);
|
||||||
|
resultMap.put("boCtrlMap", service.selectBOAtmcSndngManageListInqire(vo));
|
||||||
|
resultMap.put("shopAtmcSndntTme", service.selectBOShopAtmcSndngTme(vo));
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/atmcsndng/selectBOAtmcSndngManageListInqire", vo)
|
||||||
|
// );
|
||||||
|
|
||||||
model.addAttribute("resultListMap", resultMap.get("boCtrlMap"));
|
model.addAttribute("resultListMap", resultMap.get("boCtrlMap"));
|
||||||
model.addAttribute("bOAtmcSndngVO",resultMap.get("bOAtmcSndngVO"));
|
model.addAttribute("bOAtmcSndngVO",resultMap.get("bOAtmcSndngVO"));
|
||||||
@@ -91,9 +127,11 @@ public class MaAtmcSndngController {
|
|||||||
model.addAttribute("shopAtmcSndntTme", resultMap.get("shopAtmcSndntTme"));
|
model.addAttribute("shopAtmcSndntTme", resultMap.get("shopAtmcSndntTme"));
|
||||||
|
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
log.error(wre.getMessage(), wre);
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
return "admin/ntcn/atmcsndng/MaAtmcSndngListR";
|
return "admin/ntcn/atmcsndng/MaAtmcSndngListR";
|
||||||
@@ -101,23 +139,36 @@ public class MaAtmcSndngController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 자동 발송 관리 페이지 > 자동 발송 관리 - 자동 발송 관리 수정
|
* 자동 발송 관리 페이지 > 자동 발송 관리 - 자동 발송 관리 수정
|
||||||
* @param vo
|
* @param boAtmcSndngVO
|
||||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||||
* @return ResponseEntity<WnbtResponse>
|
* @return ResponseEntity<WnbtResponse>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/updateAtmcSndngManage", method = RequestMethod.POST)
|
@RequestMapping(value="/updateAtmcSndngManage", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateAtmcSndngManage(@Validated AtmcSndngVO atmcSndngVO, BindingResult bindingResult){
|
public ResponseEntity<WnbtResponse> updateAtmcSndngManage(@Validated BOMaAtmcSndngVO boAtmcSndngVO, BindingResult bindingResult){
|
||||||
|
|
||||||
log.debug("자동 발송 관리 수정 FO 파라미터 vo =>{}", atmcSndngVO);
|
log.debug("자동 발송 관리 수정 FO 파라미터 vo =>{}", boAtmcSndngVO);
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
if("01".equals(user.getSysDvCd())){
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/atmcsndng/updateBOAtmcSndngManageUpdt", atmcSndngVO),
|
boAtmcSndngVO.setSopmalCd(user.getSopmalCd());
|
||||||
ReplyFromResrc::getReply
|
}
|
||||||
|
|
||||||
|
Map<String, Object> message = new HashMap<>();
|
||||||
|
message = service.updateBOAtmcSndngManageUpdt(boAtmcSndngVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/atmcsndng/updateBOAtmcSndngManageUpdt", atmcSndngVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
package com.wb.domainserver.domain.admin.ntcn.email.controller;
|
package com.wb.domainserver.domain.admin.ntcn.email.controller;
|
||||||
|
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.email.service.BOMaEmailService;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.email.vo.BOMaEmailSrchVO;
|
||||||
import com.wb.domainserver.domain.admin.ntcn.email.vo.MaEmailSrchVO;
|
import com.wb.domainserver.domain.admin.ntcn.email.vo.MaEmailSrchVO;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||||
|
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -49,62 +57,139 @@ public class MaEmailController {
|
|||||||
private SendToResrc sendToResrc;
|
private SendToResrc sendToResrc;
|
||||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaEmailService service;
|
||||||
|
@Autowired
|
||||||
|
private BOMaSopmalService maSopmalService;
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
@Autowired
|
||||||
|
private BOCommonService boCommonService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 이메일 발송 내역 페이지(폼)
|
* 이메일 발송 내역 페이지(폼)
|
||||||
* @param model
|
* @param model
|
||||||
* @param maEmailSrchVO
|
* @param bOMaEmailSrchVO
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectEmailSndngDtlsListInqireForm")
|
@RequestMapping("/selectEmailSndngDtlsListInqireForm")
|
||||||
public String selectEmailSndngDtlsListInqireForm(ModelMap model, MaEmailSrchVO maEmailSrchVO) {
|
public String selectEmailSndngDtlsListInqireForm(ModelMap model, BOMaEmailSrchVO bOMaEmailSrchVO) {
|
||||||
//BO에서 API 호출(이메일 발송내 목록 조회)
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
List<DataMap> code = null;
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqireForm", maEmailSrchVO),
|
//검색 폼 paramVO
|
||||||
model,
|
code = maSopmalService.selectBOSopmalCdNm();
|
||||||
"resultSrchMap"
|
//검색 폼 code
|
||||||
);
|
resultMap.put("bOMaEmailSrchVO",bOMaEmailSrchVO);
|
||||||
|
resultMap.put("code", code);
|
||||||
|
|
||||||
|
model.addAttribute("resultSrchMap", resultMap);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqireForm", maEmailSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultSrchMap"
|
||||||
|
// );
|
||||||
return "admin/ntcn/email/MaEmailSndngDtlsListInqireRForm";
|
return "admin/ntcn/email/MaEmailSndngDtlsListInqireRForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 이메일 발송 내역 - 리스트 조회
|
* 이메일 발송 내역 - 리스트 조회
|
||||||
* @param model
|
* @param model
|
||||||
* @param maEmailSrchVO
|
* @param bOMaEmailSrchVO
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectEmailSndngDtlsListInqire")
|
@RequestMapping("/selectEmailSndngDtlsListInqire")
|
||||||
public String selectEmailSndngDtlsListInqire(ModelMap model, MaEmailSrchVO maEmailSrchVO) {
|
public String selectEmailSndngDtlsListInqire(ModelMap model, BOMaEmailSrchVO bOMaEmailSrchVO) {
|
||||||
//BO 이메일 발송내 목록 조회 API 호출
|
//BO 이메일 발송내 목록 조회 API 호출
|
||||||
try {
|
try {
|
||||||
responseHandler.handleResponse(
|
String srchShop = bOMaEmailSrchVO.getSrchShop();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
if (srchShop == null) {
|
||||||
model,
|
bOMaEmailSrchVO.setSrchShop(MemberJwtContextHolder.getMemberInfo().getSopmalCd());
|
||||||
"resultListMap"
|
} else if (srchShop.equals("ALL")) {
|
||||||
);
|
bOMaEmailSrchVO.setSrchShop(null);
|
||||||
model.addAttribute("emailSrchVO",maEmailSrchVO);
|
}
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(bOMaEmailSrchVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(bOMaEmailSrchVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
bOMaEmailSrchVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
bOMaEmailSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
bOMaEmailSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
bOMaEmailSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//시크릿 키 설정
|
||||||
|
String secretKey = boCommonService.selectSecretkey();
|
||||||
|
bOMaEmailSrchVO.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
//이메일 발송 내역 조회 결과 및 페이징정보 넣기
|
||||||
|
content.put("paginationInfo", bOMaEmailSrchVO.getPaginationInfo());
|
||||||
|
content.put("boCtrlMap", service.selectBOMaEmailSndngListInqire(bOMaEmailSrchVO));
|
||||||
|
content.put("BOMaEmailSrchVO", bOMaEmailSrchVO);
|
||||||
|
|
||||||
|
model.addAttribute("resultSrchMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultListMap"
|
||||||
|
// );
|
||||||
|
model.addAttribute("emailSrchVO",bOMaEmailSrchVO);
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
|
log.error(wre.getMessage(), wre);
|
||||||
throw new WnbtRestException(wre.getMessage());
|
throw new WnbtRestException(wre.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
throw new WnbtRestException(e.getMessage());
|
||||||
}
|
}
|
||||||
return "admin/ntcn/email/MaEmailSndngDtlsListInqireR";
|
return "admin/ntcn/email/MaEmailSndngDtlsListInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 이메일 발송 내역 - 엑셀 다운로드
|
* 이메일 발송 내역 - 엑셀 다운로드
|
||||||
* @param maEmailSrchVO
|
* @param bOMaEmailSrchVO
|
||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectEmailSndngDtlsListExcelDwld" , method = RequestMethod.POST)
|
@RequestMapping(value="/selectEmailSndngDtlsListExcelDwld" , method = RequestMethod.POST)
|
||||||
public void selectEmailSndngDtlsListExcelDwld(MaEmailSrchVO maEmailSrchVO, HttpServletResponse response) {
|
public void selectEmailSndngDtlsListExcelDwld(BOMaEmailSrchVO bOMaEmailSrchVO, HttpServletResponse response) {
|
||||||
maEmailSrchVO.setPageIndex(1); //10000건까지 엑셀 출력
|
bOMaEmailSrchVO.setPageIndex(1); //10000건까지 엑셀 출력
|
||||||
maEmailSrchVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
bOMaEmailSrchVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire",maEmailSrchVO)
|
String srchShop = bOMaEmailSrchVO.getSrchShop();
|
||||||
);
|
if (srchShop == null) {
|
||||||
|
bOMaEmailSrchVO.setSrchShop(MemberJwtContextHolder.getMemberInfo().getSopmalCd());
|
||||||
|
} else if (srchShop.equals("ALL")) {
|
||||||
|
bOMaEmailSrchVO.setSrchShop(null);
|
||||||
|
}
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(bOMaEmailSrchVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(bOMaEmailSrchVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
bOMaEmailSrchVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
bOMaEmailSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
bOMaEmailSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
bOMaEmailSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//시크릿 키 설정
|
||||||
|
String secretKey = boCommonService.selectSecretkey();
|
||||||
|
bOMaEmailSrchVO.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
//이메일 발송 내역 조회 결과 및 페이징정보 넣기
|
||||||
|
resultMap.put("paginationInfo", bOMaEmailSrchVO.getPaginationInfo());
|
||||||
|
resultMap.put("boCtrlMap", service.selectBOMaEmailSndngListInqire(bOMaEmailSrchVO));
|
||||||
|
resultMap.put("BOMaEmailSrchVO", bOMaEmailSrchVO);
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire",maEmailSrchVO)
|
||||||
|
// );
|
||||||
|
|
||||||
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
||||||
if(resultMap != null) {
|
if(resultMap != null) {
|
||||||
@@ -162,18 +247,27 @@ public class MaEmailController {
|
|||||||
/**
|
/**
|
||||||
* 이메일 발송 내역 - 리스트 조회 > 이메일 상세 조회 팝업 (발신 정보)
|
* 이메일 발송 내역 - 리스트 조회 > 이메일 상세 조회 팝업 (발신 정보)
|
||||||
* @param model
|
* @param model
|
||||||
* @param maEmailSrchVO
|
* @param bOMaEmailSrchVO
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectEmailSndngDtlPopup")
|
@RequestMapping("/selectEmailSndngDtlPopup")
|
||||||
public String selectEmailSndngDtlPopup(ModelMap model, MaEmailSrchVO maEmailSrchVO) {
|
public String selectEmailSndngDtlPopup(ModelMap model, BOMaEmailSrchVO bOMaEmailSrchVO) {
|
||||||
//BO에서 API 호출(이메일 발송내 목록 조회)
|
|
||||||
responseHandler.handleResponse(
|
Map<String, Object> content = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngDtlInfo", maEmailSrchVO),
|
|
||||||
model,
|
//시크릿 키 설정
|
||||||
"resultMapDtl"
|
String secretKey = boCommonService.selectSecretkey();
|
||||||
);
|
bOMaEmailSrchVO.setSecretKey(secretKey);
|
||||||
|
|
||||||
|
content.put("boCtrlMap", service.selectBOMaEmailSndngDtlInfo(bOMaEmailSrchVO));
|
||||||
|
|
||||||
|
model.addAttribute("resultMapDtl", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngDtlInfo", maEmailSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultMapDtl"
|
||||||
|
// );
|
||||||
return "admin/ntcn/email/MaEmailSndngDtlPopupR";
|
return "admin/ntcn/email/MaEmailSndngDtlPopupR";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,25 @@
|
|||||||
package com.wb.domainserver.domain.admin.ntcn.sms.controller;
|
package com.wb.domainserver.domain.admin.ntcn.sms.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.mssage.service.BOMaMssageService;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.mssage.vo.BOMaMssageSrchVO;
|
||||||
import com.wb.domainserver.domain.admin.ntcn.sms.vo.MaSmsSrchVO;
|
import com.wb.domainserver.domain.admin.ntcn.sms.vo.MaSmsSrchVO;
|
||||||
|
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.mngr.ntcn.mssage.vo.MssageSrchVO;
|
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.MssageSrchVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -52,20 +63,56 @@ public class MaSmsController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaMssageService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService bOMaComncdService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaSopmalService maSopmalService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOCommonService boCommonService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 문자메시지 발송 목록 조회 폼
|
* 문자메시지 발송 목록 조회 폼
|
||||||
* @param MssageSrchVO
|
* @param boMaMssageSrchVO
|
||||||
* @return MaSmsSndngDtlsListInqireRForm.jsp
|
* @return MaSmsSndngDtlsListInqireRForm.jsp
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSmsSndngDtlsListInqireForm")
|
@RequestMapping("/selectSmsSndngDtlsListInqireForm")
|
||||||
public String selectSmsSndngDtlsListInqireForm(ModelMap model, MssageSrchVO mssageSrchVO) {
|
public String selectSmsSndngDtlsListInqireForm(ModelMap model, BOMaMssageSrchVO boMaMssageSrchVO) {
|
||||||
//BO에서 API 호출
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/mssage/selectBOSmsSndngDtlsListInqireForm", mssageSrchVO),
|
//브랜드코드
|
||||||
model,
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
"resultMap"
|
|
||||||
);
|
//메시지 종류
|
||||||
|
bOMaComncdVO.setGroupCd("SMS_SNDNG_KND");
|
||||||
|
List<DataMap> sms = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
//발송상태
|
||||||
|
bOMaComncdVO.setGroupCd("SMS_SNDNG_STTUS");
|
||||||
|
List<DataMap> smsTy = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
//검색 폼 code
|
||||||
|
resultMap.put("brand",maSopmalService.selectBOSopmalCdNm());
|
||||||
|
resultMap.put("sms",sms);
|
||||||
|
resultMap.put("smsTy",smsTy);
|
||||||
|
resultMap.put("boMaMssageSrchVO",boMaMssageSrchVO);
|
||||||
|
resultMap.put("code",service.selectBOSmsSndngDtlsListInqireForm());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", resultMap);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/mssage/selectBOSmsSndngDtlsListInqireForm", mssageSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/ntcn/sms/MaSmsSndngDtlsListInqireRForm";
|
return "admin/ntcn/sms/MaSmsSndngDtlsListInqireRForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,16 +123,41 @@ public class MaSmsController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSmsSndngDtlsListInqire")
|
@RequestMapping("/selectSmsSndngDtlsListInqire")
|
||||||
public String selectSmsSndngDtlsListInqire(ModelMap model, MaSmsSrchVO maSmsSrchVO) {
|
public String selectSmsSndngDtlsListInqire(ModelMap model, BOMaMssageSrchVO bOMaMssageSrchVO) {
|
||||||
|
|
||||||
//BO 문자메시지 발송 내역 조회 API 호출
|
//BO 문자메시지 발송 내역 조회 API 호출
|
||||||
try {
|
try {
|
||||||
responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/mssage/selectBOSmsSndngListInqire", maSmsSrchVO),
|
bOMaMssageSrchVO.setRegusr(user.getUserInnb());
|
||||||
model,
|
bOMaMssageSrchVO.setUpdusr(user.getUserInnb());
|
||||||
"resultListMap"
|
|
||||||
);
|
DataMap content = new DataMap();
|
||||||
model.addAttribute("maSmsSrchVO", maSmsSrchVO);
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(bOMaMssageSrchVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(bOMaMssageSrchVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
bOMaMssageSrchVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
bOMaMssageSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
bOMaMssageSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
bOMaMssageSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
bOMaMssageSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||||
|
|
||||||
|
//메시지 발송 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
content.put("paginationInfo", bOMaMssageSrchVO.getPaginationInfo());
|
||||||
|
content.put("mssageMap", service.selectBOSmsSndngListInqire(bOMaMssageSrchVO));
|
||||||
|
content.put("bOMaMssageSrchVO", bOMaMssageSrchVO);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/mssage/selectBOSmsSndngListInqire", maSmsSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultListMap"
|
||||||
|
// );
|
||||||
|
model.addAttribute("maSmsSrchVO", bOMaMssageSrchVO);
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
throw new WnbtRestException(wre.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -101,31 +173,59 @@ public class MaSmsController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSmsSndngDtlPopup")
|
@RequestMapping("/selectSmsSndngDtlPopup")
|
||||||
public String selectSmsSndngDtlPopup(ModelMap model, MssageSrchVO mssageSrchVO) {
|
public String selectSmsSndngDtlPopup(ModelMap model, BOMaMssageSrchVO bOMaMssageSrchVO) {
|
||||||
log.debug("메시지 상세 조회 팝업 param =>{}", mssageSrchVO);
|
log.debug("메시지 상세 조회 팝업 param =>{}", bOMaMssageSrchVO);
|
||||||
|
|
||||||
//BO에서 API 호출
|
Map<String, Object> content = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
content.put("mssageDtlMap", service.selectBOSmsSndngDtlInfo(bOMaMssageSrchVO));
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/mssage/selectBOSmsSndngDtlInfo", mssageSrchVO),
|
|
||||||
model,
|
model.addAttribute("resultMap", content);
|
||||||
"resultMap"
|
// responseHandler.handleResponse(
|
||||||
);
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/mssage/selectBOSmsSndngDtlInfo", mssageSrchVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/ntcn/sms/MaSmsSndngDtlPopupR";
|
return "admin/ntcn/sms/MaSmsSndngDtlPopupR";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 엑셀 다운로드
|
* 엑셀 다운로드
|
||||||
* @param MssageSrchVO
|
* @param bOMaMssageSrchVO
|
||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value="/selectSmsSndngDtlsListExcelDwld" , method = RequestMethod.POST)
|
@RequestMapping(value="/selectSmsSndngDtlsListExcelDwld" , method = RequestMethod.POST)
|
||||||
public void selectSmsSndngDtlsListExcelDwld(MssageSrchVO mssageSrchVO,HttpServletResponse response) {
|
public void selectSmsSndngDtlsListExcelDwld(BOMaMssageSrchVO bOMaMssageSrchVO,HttpServletResponse response) {
|
||||||
mssageSrchVO.setPageIndex(1); //10000건까지 엑셀 출력
|
bOMaMssageSrchVO.setPageIndex(1); //10000건까지 엑셀 출력
|
||||||
mssageSrchVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
bOMaMssageSrchVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngListInqire",mssageSrchVO)
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
);
|
bOMaMssageSrchVO.setRegusr(user.getUserInnb());
|
||||||
|
bOMaMssageSrchVO.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
DataMap resultMap = new DataMap();
|
||||||
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(bOMaMssageSrchVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(bOMaMssageSrchVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
bOMaMssageSrchVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
bOMaMssageSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
bOMaMssageSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
bOMaMssageSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
bOMaMssageSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||||
|
|
||||||
|
//메시지 발송 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
resultMap.put("paginationInfo", bOMaMssageSrchVO.getPaginationInfo());
|
||||||
|
resultMap.put("mssageMap", service.selectBOSmsSndngListInqire(bOMaMssageSrchVO));
|
||||||
|
resultMap.put("bOMaMssageSrchVO", bOMaMssageSrchVO);
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngListInqire",mssageSrchVO)
|
||||||
|
// );
|
||||||
|
|
||||||
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
||||||
if(resultMap != null) {
|
if(resultMap != null) {
|
||||||
|
|||||||
@@ -1,13 +1,23 @@
|
|||||||
package com.wb.domainserver.domain.admin.ntcn.stl.controller;
|
package com.wb.domainserver.domain.admin.ntcn.stl.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.stl.service.BOMaStlMssageService;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.stl.vo.BOMaStlMssageVO;
|
||||||
import com.wb.domainserver.domain.admin.ntcn.stl.vo.MaStlMssageVO;
|
import com.wb.domainserver.domain.admin.ntcn.stl.vo.MaStlMssageVO;
|
||||||
|
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.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -54,19 +64,70 @@ public class MaStlMssageController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaStlMssageService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService bOMaComncdService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 메세지 정산 조회 폼
|
* 메세지 정산 조회 폼
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectMaStlMssageListInqireRForm")
|
@RequestMapping(value="/selectMaStlMssageListInqireRForm")
|
||||||
public String selectMaStlMssageListInqireRForm(MaStlMssageVO vo, ModelMap model){
|
public String selectMaStlMssageListInqireRForm(BOMaStlMssageVO vo, ModelMap model){
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if("04".equals(user.getSysDvCd())){
|
||||||
|
vo.setStrInnb(String.valueOf(user.getUserInnb()));
|
||||||
|
}
|
||||||
|
vo.setSopmalCd(user.getReprsntBrand());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/stl/selectBOMaStlMssageListRForm", vo),
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
model,
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
"resultMap"
|
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);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/stl/selectBOMaStlMssageListRForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/ntcn/stl/MaStlMssageListInqireRForm";
|
return "admin/ntcn/stl/MaStlMssageListInqireRForm";
|
||||||
}
|
}
|
||||||
@@ -77,13 +138,37 @@ public class MaStlMssageController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectMaStlMssageListInqire")
|
@RequestMapping(value="/selectMaStlMssageListInqire")
|
||||||
public String selectMaStlMssageListInqire(MaStlMssageVO vo, ModelMap model){
|
public String selectMaStlMssageListInqire(BOMaStlMssageVO vo, ModelMap model){
|
||||||
|
log.debug("vo => {}",vo);
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
Map<String, Object> content = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/stl/selectBOMaStlMssageList", vo),
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
model,
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
"resultMap"
|
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");
|
||||||
|
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
content.put("strInfo", service.selectBOMaStlMssageCharge(vo));
|
||||||
|
log.debug("정산 목록 조회 내용 => {}", content);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/stl/selectBOMaStlMssageList", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/ntcn/stl/MaStlMssageListInqireR";
|
return "admin/ntcn/stl/MaStlMssageListInqireR";
|
||||||
}
|
}
|
||||||
@@ -94,12 +179,39 @@ public class MaStlMssageController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value = "/excelFileDownload")
|
@RequestMapping(value = "/excelFileDownload")
|
||||||
public void excelFileDownload(MaStlMssageVO vo, HttpServletResponse response, ModelMap model) {
|
public void excelFileDownload(BOMaStlMssageVO vo, HttpServletResponse response, ModelMap model) {
|
||||||
vo.setPageIndex(1);
|
vo.setPageIndex(1);
|
||||||
vo.setPageUnit(50);
|
vo.setPageUnit(50);
|
||||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/stl/selectBOMaStlMssageList", vo)
|
log.debug("vo => {}",vo);
|
||||||
);
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
|
Map<String, Object> resultMap = 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);
|
||||||
|
|
||||||
|
resultMap.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
resultMap.put("strInfo", service.selectBOMaStlMssageCharge(vo));
|
||||||
|
// content.put("appen", appen);
|
||||||
|
log.debug("정산 목록 조회 내용 => {}", resultMap);
|
||||||
|
|
||||||
|
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/stl/selectBOMaStlMssageList", vo)
|
||||||
|
// );
|
||||||
|
|
||||||
/*엑셀 데이터 set*/
|
/*엑셀 데이터 set*/
|
||||||
List<Map<String, Object>> excelList = new ArrayList<>();
|
List<Map<String, Object>> excelList = new ArrayList<>();
|
||||||
|
|||||||
@@ -1,19 +1,27 @@
|
|||||||
package com.wb.domainserver.domain.admin.ntcn.tmplt.controller;
|
package com.wb.domainserver.domain.admin.ntcn.tmplt.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.tmplt.service.BOMaTmpltService;
|
||||||
|
import com.wb.domainserver.domain.admin.ntcn.tmplt.vo.BOMaTmpltVO;
|
||||||
import com.wb.domainserver.domain.admin.ntcn.tmplt.vo.MaTmpltVO;
|
import com.wb.domainserver.domain.admin.ntcn.tmplt.vo.MaTmpltVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
import com.wb.domainserver.util.string.StringUtil;
|
||||||
import jakarta.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -22,6 +30,10 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 템플릿 관리 Controller
|
* 템플릿 관리 Controller
|
||||||
* @author 리브가
|
* @author 리브가
|
||||||
@@ -55,18 +67,46 @@ public class MaTmpltController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaTmpltService service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 템플릿 관리 페이지
|
* 템플릿 관리 페이지
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectAtmcSndngTmplatManage")
|
@RequestMapping(value="/selectAtmcSndngTmplatManage")
|
||||||
public String selectEmailPassivSndngManage(ModelMap model, MaTmpltVO maTmpltVO){
|
public String selectEmailPassivSndngManage(ModelMap model, BOMaTmpltVO vo){
|
||||||
responseHandler.handleResponse(
|
log.debug("이메일 자동 발송 템플릿 BO 진입 =>{}", vo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOAtmcSndngTmplatManage", maTmpltVO),
|
|
||||||
model,
|
//사용자 정보 추출 및 적용
|
||||||
"resultMap"
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
);
|
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
List<DataMap> sopmalCdList = service.selectBOSopmalAtmcSndng();
|
||||||
|
content.put("sopmalCdList", sopmalCdList);
|
||||||
|
|
||||||
|
//초기 쇼핑몰 코드 없을 경우 목록의 첫번째 입력
|
||||||
|
if("".equals(StringUtil.isNullToString(vo.getSopmalCd()))) {
|
||||||
|
vo.setSopmalCd(StringUtil.isNullToString(sopmalCdList.get(0).get("sopmalCd")));
|
||||||
|
}
|
||||||
|
|
||||||
|
content.put("boMaTmpltVo", vo);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOAtmcSndngTmplatManage", maTmpltVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/ntcn/tmplt/MaAtmcSndngTmplatManage";
|
return "admin/ntcn/tmplt/MaAtmcSndngTmplatManage";
|
||||||
}
|
}
|
||||||
@@ -74,25 +114,58 @@ public class MaTmpltController {
|
|||||||
/**
|
/**
|
||||||
* 템플릿 관리 > 이메일 템플릿 폼
|
* 템플릿 관리 > 이메일 템플릿 폼
|
||||||
* @param model
|
* @param model
|
||||||
* @param tmpltVO
|
* @param vo
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectEmailAtmcSndngTmplatOneInqireForm")
|
@RequestMapping(value = "/selectEmailAtmcSndngTmplatOneInqireForm")
|
||||||
public String selectEmailAtmcSndngTmplatOneInqireForm(ModelMap model, MaTmpltVO tmpltVO, HttpSession session) {
|
public String selectEmailAtmcSndngTmplatOneInqireForm(ModelMap model, BOMaTmpltVO vo, HttpSession session) {
|
||||||
try {
|
try {
|
||||||
|
log.debug("이메일 자동 발송 템플릿 BO 진입 =>{}", vo);
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
model,
|
|
||||||
"resultListMap"
|
|
||||||
);
|
|
||||||
|
|
||||||
model.addAttribute("tmpltVO",tmpltVO);
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
List<DataMap> sopmalCdList = service.selectBOSopmalAtmcSndng();
|
||||||
|
content.put("sopmalCdList", sopmalCdList);
|
||||||
|
|
||||||
|
|
||||||
|
//초기 쇼핑몰 코드 없을 경우 목록의 첫번째 입력
|
||||||
|
if("".equals(StringUtil.isNullToString(vo.getSopmalCd()))) {
|
||||||
|
vo.setSopmalCd(StringUtil.isNullToString(sopmalCdList.get(0).get("sopmalCd")));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
content.put("bOTmpltVO", vo);
|
||||||
|
// content.put("groupCd", service.selectBOTmplatGroupCd("FORM_DV"));
|
||||||
|
content.put("groupCd", service.selectBOTmplatGroup(vo.getSopmalCd()));
|
||||||
|
content.put("formDvCd", service.selectBOTmplatFormGroup(vo.getSopmalCd()));
|
||||||
|
content.put("boCtrlMap", service.selectBOEmailAtmcSndngTmplatOneInqireForm(vo));
|
||||||
|
content.put("dsptchAdres", service.selectBOEmailAtmcSndngDsptchAdres(vo));
|
||||||
|
|
||||||
|
model.addAttribute("resultListMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
||||||
|
// model,
|
||||||
|
// "resultListMap"
|
||||||
|
// );
|
||||||
|
|
||||||
|
model.addAttribute("tmpltVO",vo);
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
|
log.error(wre.getMessage(), wre);
|
||||||
throw new WnbtRestException(wre.getMessage());
|
throw new WnbtRestException(wre.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
throw new WnbtRestException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return "admin/ntcn/tmplt/MaEmailAtmcSndngTmplatU";
|
return "admin/ntcn/tmplt/MaEmailAtmcSndngTmplatU";
|
||||||
@@ -104,53 +177,130 @@ public class MaTmpltController {
|
|||||||
* @author 이대환
|
* @author 이대환
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value="/selectEmailAtmcSndngTmplatOne")
|
@RequestMapping(value="/selectEmailAtmcSndngTmplatOne", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectEmailAtmcSndngTmplatOne(MaTmpltVO tmpltVO, HttpSession session){
|
public ResponseEntity<WnbtResponse> selectEmailAtmcSndngTmplatOne(BOMaTmpltVO vo, HttpSession session){
|
||||||
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
log.debug("이메일 자동 발송 템플릿 BO 진입 =>{}", vo);
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
List<DataMap> sopmalCdList = service.selectBOSopmalAtmcSndng();
|
||||||
|
content.put("sopmalCdList", sopmalCdList);
|
||||||
|
|
||||||
|
|
||||||
|
//초기 쇼핑몰 코드 없을 경우 목록의 첫번째 입력
|
||||||
|
if("".equals(StringUtil.isNullToString(vo.getSopmalCd()))) {
|
||||||
|
vo.setSopmalCd(StringUtil.isNullToString(sopmalCdList.get(0).get("sopmalCd")));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
content.put("bOTmpltVO", vo);
|
||||||
|
// content.put("groupCd", service.selectBOTmplatGroupCd("FORM_DV"));
|
||||||
|
content.put("groupCd", service.selectBOTmplatGroup(vo.getSopmalCd()));
|
||||||
|
content.put("formDvCd", service.selectBOTmplatFormGroup(vo.getSopmalCd()));
|
||||||
|
content.put("boCtrlMap", service.selectBOEmailAtmcSndngTmplatOneInqireForm(vo));
|
||||||
|
content.put("dsptchAdres", service.selectBOEmailAtmcSndngDsptchAdres(vo));
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 템플릿 관리 > 이메일 템플릿 - 이메일 템플릿 수정
|
* 템플릿 관리 > 이메일 템플릿 - 이메일 템플릿 수정
|
||||||
* @param tmpltVO
|
* @param vo
|
||||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||||
* @return ResponseEntity<WnbtResponse>
|
* @return ResponseEntity<WnbtResponse>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateEmailAtmcSndngTmplatUpdt", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateEmailAtmcSndngTmplatUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateEmailAtmcSndngTmplatUpdt(MaTmpltVO tmpltVO, BindingResult bindingResult, HttpSession session) {
|
public ResponseEntity<WnbtResponse> updateEmailAtmcSndngTmplatUpdt(BOMaTmpltVO vo, BindingResult bindingResult, HttpSession session) {
|
||||||
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
log.debug("이메일 자동 발송 템플릿 수정 BO 진입 =>{}", vo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/updateBOEmailAtmcSndngTmplatUpdt", tmpltVO),
|
|
||||||
ReplyFromResrc::getReply
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> message = new HashMap<>();
|
||||||
|
message = service.updateBOEmailAtmcSndngTmplatUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/updateBOEmailAtmcSndngTmplatUpdt", tmpltVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 템플릿 관리 > SMS 템플릿 폼
|
* 템플릿 관리 > SMS 템플릿 폼
|
||||||
* @param model
|
* @param model
|
||||||
* @param tmpltVO
|
* @param vo
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectMssageAtmcSndngTmplatInqireForm")
|
@RequestMapping(value = "/selectMssageAtmcSndngTmplatInqireForm")
|
||||||
public String selectMssageAtmcSndngTmplatInqireForm(ModelMap model, MaTmpltVO tmpltVO, HttpSession session) {
|
public String selectMssageAtmcSndngTmplatInqireForm(ModelMap model, BOMaTmpltVO vo, HttpSession session) {
|
||||||
try {
|
try {
|
||||||
|
log.debug("메시지 자동 발송 템플릿 BO 진입 =>{}", vo);
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOMssageAtmcSndngTmplatInqireForm", tmpltVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
model,
|
|
||||||
"resultListMap"
|
|
||||||
);
|
|
||||||
|
|
||||||
model.addAttribute("tmpltVO",tmpltVO);
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
content.put("bOTmpltVO", vo);
|
||||||
|
// content.put("groupCd", service.selectBOTmplatGroupCd("FORM_DV"));
|
||||||
|
content.put("groupCd", service.selectBOTmplatGroup(vo.getSopmalCd()));
|
||||||
|
content.put("formDvCd", service.selectBOTmplatFormGroup(vo.getSopmalCd()));
|
||||||
|
content.put("boCtrlMap", service.selectBOMssageAtmcSndngTmplatInqireForm(vo));
|
||||||
|
|
||||||
|
model.addAttribute("resultListMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBOMssageAtmcSndngTmplatInqireForm", tmpltVO),
|
||||||
|
// model,
|
||||||
|
// "resultListMap"
|
||||||
|
// );
|
||||||
|
|
||||||
|
model.addAttribute("tmpltVO",vo);
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
throw new WnbtRestException(wre.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -162,43 +312,81 @@ public class MaTmpltController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 템플릿 관리 > SMS 템플릿 - SMS 템플릿 수정
|
* 템플릿 관리 > SMS 템플릿 - SMS 템플릿 수정
|
||||||
* @param serializedFormData
|
* @param boTmpltVO
|
||||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||||
* @return ResponseEntity<WnbtResponse>
|
* @return ResponseEntity<WnbtResponse>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateMssageAtmcSndngTmplatUpdt", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateMssageAtmcSndngTmplatUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateMssageAtmcSndngTmplatUpdt(MaTmpltVO tmpltVO, BindingResult bindingResult, HttpSession session) {
|
public ResponseEntity<WnbtResponse> updateMssageAtmcSndngTmplatUpdt(BOMaTmpltVO boTmpltVO, BindingResult bindingResult, HttpSession session) {
|
||||||
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/updateBOMssageAtmcSndngTmplatUpdt", tmpltVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
boTmpltVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
log.debug("메시지 자동 발송 템플릿 수정 BO 진입 =>{}", boTmpltVO);
|
||||||
|
|
||||||
|
Map<String, Object> message = new HashMap<>();
|
||||||
|
message = service.updateBOMssageAtmcSndngTmplatUpdt(boTmpltVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/updateBOMssageAtmcSndngTmplatUpdt", tmpltVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 템플릿 관리 > 알림톡 템플릿 폼
|
* 템플릿 관리 > 알림톡 템플릿 폼
|
||||||
* @param model
|
* @param model
|
||||||
* @param tmpltVO
|
* @param vo
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectNtcntalkAtmcSndngTmplatInqireForm")
|
@RequestMapping(value = "/selectNtcntalkAtmcSndngTmplatInqireForm")
|
||||||
public String selectNtcntalkAtmcSndngTmplatInqireForm(ModelMap model, MaTmpltVO tmpltVO, HttpSession session) {
|
public String selectNtcntalkAtmcSndngTmplatInqireForm(ModelMap model, BOMaTmpltVO vo, HttpSession session) {
|
||||||
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||||
try {
|
try {
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
log.debug("알림톡 자동 발송 템플릿 BO 진입 =>{}", vo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatInqireForm", tmpltVO),
|
|
||||||
model,
|
|
||||||
"resultListMap"
|
|
||||||
);
|
|
||||||
|
|
||||||
model.addAttribute("tmpltVO",tmpltVO);
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
|
content.put("bOTmpltVO", vo);
|
||||||
|
// content.put("groupCd", service.selectBOTmplatGroupCd("FORM_DV"));
|
||||||
|
content.put("groupCd", service.selectBOTmplatGroup(vo.getSopmalCd()));
|
||||||
|
content.put("formDvCd", service.selectBOTmplatFormGroup(vo.getSopmalCd()));
|
||||||
|
content.put("boCtrlMap", service.selectBONtcntalkAtmcSndngTmplatInqireForm(vo));
|
||||||
|
|
||||||
|
model.addAttribute("resultListMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatInqireForm", tmpltVO),
|
||||||
|
// model,
|
||||||
|
// "resultListMap"
|
||||||
|
// );
|
||||||
|
|
||||||
|
model.addAttribute("tmpltVO",vo);
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
throw new WnbtRestException(wre.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -211,23 +399,38 @@ public class MaTmpltController {
|
|||||||
/**
|
/**
|
||||||
* 템플릿 관리 > 알림톡 템플릿 > 알림톡 탬플릿 수정 팝업 폼
|
* 템플릿 관리 > 알림톡 템플릿 > 알림톡 탬플릿 수정 팝업 폼
|
||||||
* @param model
|
* @param model
|
||||||
* @param tmpltVO
|
* @param vo
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectNtcntalkAtmcSndngTmplatUpdtPopupForm")
|
@RequestMapping(value = "/selectNtcntalkAtmcSndngTmplatUpdtPopupForm")
|
||||||
public String selectNtcntalkAtmcSndngTmplatUpdtPopupForm(MaTmpltVO tmpltVO, ModelMap model, HttpSession session) {
|
public String selectNtcntalkAtmcSndngTmplatUpdtPopupForm(BOMaTmpltVO vo, ModelMap model, HttpSession session) {
|
||||||
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||||
try {
|
try {
|
||||||
|
log.debug("알림톡 자동 발송 수정 팝업 BO 진입 =>{}", vo);
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatUpdtPopupForm", tmpltVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
model,
|
|
||||||
"resultMap"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
model.addAttribute("tmpltVO",tmpltVO);
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("bOTmpltVO", vo);
|
||||||
|
content.put("boCtrlMap", service.selectBONtcntalkAtmcSndngTmplatUpdtPopupForm(vo));
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatUpdtPopupForm", tmpltVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
|
model.addAttribute("tmpltVO",vo);
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
throw new WnbtRestException(wre.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -239,22 +442,79 @@ public class MaTmpltController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 템플릿 관리 > 알림톡 템플릿 - 알림톡 템플릿 수정
|
* 템플릿 관리 > 알림톡 템플릿 - 알림톡 템플릿 수정
|
||||||
* @param serializedFormData
|
* @param vo
|
||||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||||
* @return ResponseEntity<WnbtResponse>
|
* @return ResponseEntity<WnbtResponse>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateNtcntalkAtmcSndngTmplatUpdt", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateNtcntalkAtmcSndngTmplatUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateNtcntalkAtmcSndngTmplatUpdt(@Validated MaTmpltVO tmpltVO, BindingResult bindingResult, HttpSession session) {
|
public ResponseEntity<WnbtResponse> updateNtcntalkAtmcSndngTmplatUpdt(@Validated BOMaTmpltVO vo, BindingResult bindingResult, HttpSession session) {
|
||||||
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
// tmpltVO.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
vo.setRegusr(user.getUserInnb());
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/updateBONtcntalkAtmcSndngTmplatUpdt", tmpltVO),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
//알림톡 템플릿 버튼 정제
|
||||||
|
if(vo.getBtnType() != null){
|
||||||
|
for(int i = 0; i < vo.getBtnType().size(); i++){
|
||||||
|
if(vo.getBtnType().get(i) == "DS") {
|
||||||
|
vo.getBtnNm().set(i, "");
|
||||||
|
vo.getBtnMUrl().set(i, "");
|
||||||
|
vo.getBtnPcUrl().set(i, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (vo.getBtnType().size()){
|
||||||
|
case 5:
|
||||||
|
vo.setBtnNm05(vo.getBtnNm().get(4));
|
||||||
|
vo.setBtnType05(vo.getBtnType().get(4));
|
||||||
|
vo.setBtn05Url01(vo.getBtnMUrl().get(4));
|
||||||
|
vo.setBtn05Url02(vo.getBtnPcUrl().get(4));
|
||||||
|
case 4:
|
||||||
|
vo.setBtnNm04(vo.getBtnNm().get(3));
|
||||||
|
vo.setBtnType04(vo.getBtnType().get(3));
|
||||||
|
vo.setBtn04Url01(vo.getBtnMUrl().get(3));
|
||||||
|
vo.setBtn04Url02(vo.getBtnPcUrl().get(3));
|
||||||
|
case 3:
|
||||||
|
vo.setBtnNm03(vo.getBtnNm().get(2));
|
||||||
|
vo.setBtnType03(vo.getBtnType().get(2));
|
||||||
|
vo.setBtn03Url01(vo.getBtnMUrl().get(2));
|
||||||
|
vo.setBtn03Url02(vo.getBtnPcUrl().get(2));
|
||||||
|
case 2:
|
||||||
|
vo.setBtnNm02(vo.getBtnNm().get(1));
|
||||||
|
vo.setBtnType02(vo.getBtnType().get(1));
|
||||||
|
vo.setBtn02Url01(vo.getBtnMUrl().get(1));
|
||||||
|
vo.setBtn02Url02(vo.getBtnPcUrl().get(1));
|
||||||
|
case 1:
|
||||||
|
vo.setBtnNm01(vo.getBtnNm().get(0));
|
||||||
|
vo.setBtnType01(vo.getBtnType().get(0));
|
||||||
|
vo.setBtn01Url01(vo.getBtnMUrl().get(0));
|
||||||
|
vo.setBtn01Url02(vo.getBtnPcUrl().get(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.debug("알림톡 자동 발송 템플릿 수정 BO 진입 =>{}", vo);
|
||||||
|
|
||||||
|
Map<String, Object> message = new HashMap<>();
|
||||||
|
message = service.updateBONtcntalkAtmcSndngTmplatUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/tmplt/updateBONtcntalkAtmcSndngTmplatUpdt", tmpltVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,36 @@
|
|||||||
package com.wb.domainserver.domain.admin.stats.marktAnals.controller;
|
package com.wb.domainserver.domain.admin.stats.marktAnals.controller;
|
||||||
|
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
import com.wb.domainserver.domain.admin.stats.marktAnals.service.BOMaAdminStatsService;
|
import com.wb.domainserver.domain.admin.stats.marktAnals.service.BOMaAdminStatsService;
|
||||||
|
import com.wb.domainserver.domain.admin.stats.marktAnals.vo.BOMaMbrNdMlgVO;
|
||||||
import com.wb.domainserver.domain.admin.stats.marktAnals.vo.MaStlMlgVO;
|
import com.wb.domainserver.domain.admin.stats.marktAnals.vo.MaStlMlgVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.stats.marktAnals.vo.BOMarktAnalsVO;
|
||||||
import com.wb.domainserver.domain.mngr.stats.marktAnals.vo.MarktAnalsVO;
|
import com.wb.domainserver.domain.mngr.stats.marktAnals.vo.MarktAnalsVO;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping(value = "/admin/stats/marktAnals")
|
@RequestMapping(value = "/admin/stats/marktAnals")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class MaMarktAnalsController {
|
public class MaMarktAnalsController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BOMaAdminStatsService service;
|
|
||||||
|
|
||||||
/** WebClient 호출을 위한 wrapper */
|
/** WebClient 호출을 위한 wrapper */
|
||||||
@Autowired
|
@Autowired
|
||||||
private WnbtWebClientResponseHandler responseHandler;
|
private WnbtWebClientResponseHandler responseHandler;
|
||||||
@@ -29,6 +38,10 @@ public class MaMarktAnalsController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SendToResrc sendToResrc;
|
private SendToResrc sendToResrc;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaAdminStatsService service;
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@@ -42,14 +55,21 @@ public class MaMarktAnalsController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectAdminMbrNdMlgStats")
|
@RequestMapping(value = "/selectAdminMbrNdMlgStats")
|
||||||
public String selectAdminMbrMlg(ModelMap model) {
|
public String selectAdminMbrMlg(ModelMap model, DataMap vo) {
|
||||||
MarktAnalsVO vo = new MarktAnalsVO();
|
MarktAnalsVO mavo = new MarktAnalsVO();
|
||||||
responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMbrNdMlgStats", vo),
|
// 응답 메세지 객체
|
||||||
model,
|
Map<String, Object> content = new HashMap<>();
|
||||||
"cond"
|
|
||||||
);
|
content.put("resultList", service.selectBOAdminMbrNdMlgStats(vo));
|
||||||
model.put("resultMap", vo);
|
|
||||||
|
model.addAttribute("cond", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMbrNdMlgStats", vo),
|
||||||
|
// model,
|
||||||
|
// "cond"
|
||||||
|
// );
|
||||||
|
model.put("resultMap", mavo);
|
||||||
|
|
||||||
return "admin/stats/marktAnals/MaMbrNdMlgStats";
|
return "admin/stats/marktAnals/MaMbrNdMlgStats";
|
||||||
}
|
}
|
||||||
@@ -61,13 +81,37 @@ public class MaMarktAnalsController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectAdminMbrNdMlgStatsTableInqire")
|
@RequestMapping(value = "/selectAdminMbrNdMlgStatsTableInqire")
|
||||||
public String selectAdminMbrMlgTableInqire(MarktAnalsVO vo, ModelMap model) {
|
public String selectAdminMbrMlgTableInqire(BOMarktAnalsVO vo, ModelMap model) {
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
vo.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
// 응답 메세지 객체
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMbrNdMlgStatsTableInqire", vo),
|
Map<String, Object> content = new HashMap<>();
|
||||||
model,
|
|
||||||
"resultMap"
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
);
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getRecordCountPerPage());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
List<DataMap> resultList = service.selectBOAdminMbrNdMlgStatsTableInqire(vo);
|
||||||
|
|
||||||
|
content.put("resultList", resultList);
|
||||||
|
content.put("paginationInfo", paginationInfo);
|
||||||
|
content.put("unitFlag", vo.getUnitFlag());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMbrNdMlgStatsTableInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/stats/marktAnals/MaMbrNdMlgStatsTable";
|
return "admin/stats/marktAnals/MaMbrNdMlgStatsTable";
|
||||||
}
|
}
|
||||||
@@ -99,12 +143,6 @@ public class MaMarktAnalsController {
|
|||||||
public String selectAdminMlgTableInqire(ModelMap model) {
|
public String selectAdminMlgTableInqire(ModelMap model) {
|
||||||
log.debug("selectAdminMlgTableInqire(vo = )");
|
log.debug("selectAdminMlgTableInqire(vo = )");
|
||||||
|
|
||||||
// responseHandler.handleResponse(
|
|
||||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/stats/marktAnals/selectBOAdminMbrMlgTableInqire", vo),
|
|
||||||
// model,
|
|
||||||
// "resultMap"
|
|
||||||
// );
|
|
||||||
|
|
||||||
return "admin/stats/marktAnals/mlgTable";
|
return "admin/stats/marktAnals/mlgTable";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,11 +155,18 @@ public class MaMarktAnalsController {
|
|||||||
@RequestMapping(value = "/selectAdminMlgStlForm")
|
@RequestMapping(value = "/selectAdminMlgStlForm")
|
||||||
public String selectAdminMlgStlForm(ModelMap model, MaStlMlgVO vo) {
|
public String selectAdminMlgStlForm(ModelMap model, MaStlMlgVO vo) {
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
Map<String, Object> content = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMlgStlForm", vo),
|
|
||||||
model,
|
//현재 년도
|
||||||
"resultMap"
|
int currentYear = Calendar.getInstance().get(Calendar.YEAR);
|
||||||
);
|
content.put("currentYear", currentYear);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMlgStlForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/stats/marktAnals/MlgStlForm";
|
return "admin/stats/marktAnals/MlgStlForm";
|
||||||
}
|
}
|
||||||
@@ -133,14 +178,26 @@ public class MaMarktAnalsController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectAdminMlgStlListInqire")
|
@RequestMapping(value = "/selectAdminMlgStlListInqire")
|
||||||
public String selectAdminMlgStlListInqire(ModelMap model, MaStlMlgVO vo) {
|
public String selectAdminMlgStlListInqire(ModelMap model, BOMaMbrNdMlgVO vo) {
|
||||||
log.debug("selectAdminMlgTableInqire(vo = {})", vo);
|
log.debug("selectAdminMlgTableInqire(vo = {})", vo);
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
Map<String, Object> content = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMlgStlListInqire", vo),
|
// //마일리지 통계
|
||||||
model,
|
// List<DataMap> mlgStatList = service.selectBOMaMlgStatList(vo);
|
||||||
"resultMap"
|
// log.debug("mlgStatList {}", mlgStatList);
|
||||||
);
|
// content.put("mlgStatList", mlgStatList);
|
||||||
|
//
|
||||||
|
// //마일리지 정산 목록
|
||||||
|
// List<DataMap> mlgStlList = service.selectBOMaMlgStlList(vo);
|
||||||
|
// log.debug("mlgStlList {}", mlgStlList);
|
||||||
|
// content.put("mlgStlList", mlgStlList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/stats/marktAnals/selectBOAdminMlgStlListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/stats/marktAnals/MlgStlList";
|
return "admin/stats/marktAnals/MlgStlList";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,24 @@
|
|||||||
package com.wb.domainserver.domain.admin.store.bsnm.controller;
|
package com.wb.domainserver.domain.admin.store.bsnm.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.store.bsnm.service.BOBsnmService;
|
||||||
|
import com.wb.domainserver.domain.admin.store.bsnm.vo.BOBsnmVO;
|
||||||
import com.wb.domainserver.domain.admin.store.bsnm.vo.MaBsnmVO;
|
import com.wb.domainserver.domain.admin.store.bsnm.vo.MaBsnmVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.*;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -19,6 +28,11 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 관리 Controller
|
* 사업자 관리 Controller
|
||||||
*
|
*
|
||||||
@@ -49,41 +63,69 @@ public class MaBsnmController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOBsnmService service;
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 목록 화면
|
* 사업자 목록 화면
|
||||||
* @param maBsnmVO
|
* @param boBsnmVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectBsnmListInqireForm")
|
@RequestMapping("/selectBsnmListInqireForm")
|
||||||
public String selectBsnmListInqireForm(MaBsnmVO maBsnmVO,
|
public String selectBsnmListInqireForm(BOBsnmVO boBsnmVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
//BO 발송그룹 목록조회 API 호출
|
content.put("BOBsnmVO", boBsnmVO);
|
||||||
responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmListInqireForm", maBsnmVO),
|
model.addAttribute("resultMap", content);
|
||||||
model,
|
// responseHandler.handleResponse(
|
||||||
"resultMap"
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmListInqireForm", maBsnmVO),
|
||||||
);
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/bsnm/MaBsnmListInqireRForm";
|
return "admin/store/bsnm/MaBsnmListInqireRForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 목록 조회
|
* 사업자 목록 조회
|
||||||
* @param maBsnmVO
|
* @param boBsnmVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectBsnmListInqire")
|
@RequestMapping("/selectBsnmListInqire")
|
||||||
public String selectBsnmListInqire(MaBsnmVO maBsnmVO,
|
public String selectBsnmListInqire(BOBsnmVO boBsnmVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
//BO 발송그룹 목록조회 API 호출
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
responseHandler.handleResponse(
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmListInqire", maBsnmVO),
|
paginationInfo.setCurrentPageNo(boBsnmVO.getPageIndex());
|
||||||
model,
|
paginationInfo.setRecordCountPerPage(boBsnmVO.getPageUnit());
|
||||||
"resultMap"
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
);
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boBsnmVO.setPaginationInfo(paginationInfo);
|
||||||
|
boBsnmVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boBsnmVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boBsnmVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//사업자 목록조회
|
||||||
|
List<BOBsnmVO> list = service.selectBOBsnmList(boBsnmVO);
|
||||||
|
|
||||||
|
//사업자 목록조회 결과 설정
|
||||||
|
content.put("BOBsnmVO", boBsnmVO);
|
||||||
|
content.put("paginationInfo", boBsnmVO.getPaginationInfo());
|
||||||
|
content.put("list", list);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmListInqire", maBsnmVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/bsnm/MaBsnmListInqireR";
|
return "admin/store/bsnm/MaBsnmListInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,12 +135,22 @@ public class MaBsnmController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectBsnmRegistForm")
|
@RequestMapping("/selectBsnmRegistForm")
|
||||||
public String selectBsnmRegistForm(MaBsnmVO maBsnmVO, ModelMap model) {
|
public String selectBsnmRegistForm(BOBsnmVO boBsnmVO, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
Map<String, Object> content = new HashMap<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmRegistForm", maBsnmVO),
|
|
||||||
model,
|
content.put("BOBsnmVO", boBsnmVO);
|
||||||
"resultMap"
|
|
||||||
);
|
DataMap map = service.selectGroupCd();
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
codeList.add(map);
|
||||||
|
content.put("codeList", codeList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmRegistForm", maBsnmVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/bsnm/MaBsnmRegistC";
|
return "admin/store/bsnm/MaBsnmRegistC";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,102 +159,172 @@ public class MaBsnmController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectBizrnbDplctInqire")
|
@RequestMapping(value = "/selectBizrnbDplctInqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectBizrnbDplctInqire(@RequestBody MaBsnmVO maBsnmVO) {
|
public ResponseEntity<WnbtResponse> selectBizrnbDplctInqire(@RequestBody BOBsnmVO boBsnmVO) {
|
||||||
|
Integer result = service.selectBOBizrnbDplct(boBsnmVO.getBizrnb());
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
return ResponseEntity.ok(
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBizrnbDplctInqire", maBsnmVO),
|
WnbtResponse.builder()
|
||||||
ReplyFromResrc::getReply
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBizrnbDplctInqire", maBsnmVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 등록
|
* 사업자 등록
|
||||||
* @param maBsnmVO
|
* @param boBsnmVO
|
||||||
* @param bindingResult
|
* @param bindingResult
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertBsnmRegist", method = RequestMethod.POST)
|
@RequestMapping(value = "/insertBsnmRegist", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertBsnmRegist(@Validated MaBsnmVO maBsnmVO, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> insertBsnmRegist(@Validated BOBsnmVO boBsnmVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
|
Map<String, Object> message = new HashMap<>();
|
||||||
return responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/insertBOBsnmRegist", maBsnmVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
boBsnmVO.setRegusr(user.getUserInnb());
|
||||||
);
|
boBsnmVO.setUpdusr(user.getUserInnb());
|
||||||
|
|
||||||
|
Integer result = service.selectBOBizrnbDplct(boBsnmVO.getBizrnb());
|
||||||
|
if (result > 0) {
|
||||||
|
message.put("result", "dublechk");
|
||||||
|
} else{
|
||||||
|
// 사업자 등록
|
||||||
|
message = service.insertBOBsnm(boBsnmVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/insertBOBsnmRegist", maBsnmVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 수정 화면이동
|
* 사업자 수정 화면이동
|
||||||
* @param maBsnmVO
|
* @param boBsnmVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectBsnmUpdtForm")
|
@RequestMapping("/selectBsnmUpdtForm")
|
||||||
public String selectBsnmUpdtForm(MaBsnmVO maBsnmVO,
|
public String selectBsnmUpdtForm(BOBsnmVO boBsnmVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
//사업자 정보 조회
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmDtlInqire", maBsnmVO),
|
List<BOBsnmVO> list = service.selectBOBsnmDtl(boBsnmVO);
|
||||||
model,
|
|
||||||
"resultMap"
|
content.put("BOBsnmVO", boBsnmVO);
|
||||||
);
|
content.put("list", list);
|
||||||
|
|
||||||
|
DataMap map = service.selectGroupCd();
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
codeList.add(map);
|
||||||
|
content.put("codeList", codeList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmDtlInqire", maBsnmVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/bsnm/MaBsnmUpdtU";
|
return "admin/store/bsnm/MaBsnmUpdtU";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 수정
|
* 사업자 수정
|
||||||
* @param maBsnmVO
|
* @param boBsnmVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateBsnmUpdt", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateBsnmUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateBsnmUpdt(@Validated MaBsnmVO maBsnmVO, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> updateBsnmUpdt(@Validated BOBsnmVO boBsnmVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/updateBOBsnmUpdt", maBsnmVO),
|
//사용자 정보 추출 및 적용
|
||||||
ReplyFromResrc::getReply
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
);
|
boBsnmVO.setRegusr(user.getUserInnb());
|
||||||
|
boBsnmVO.setUpdusr(user.getUserInnb());
|
||||||
|
Map<String, Object> message = service.updateBOBsnmUpdt(boBsnmVO);
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/updateBOBsnmUpdt", maBsnmVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 삭제
|
* 사업자 삭제
|
||||||
* @param maBsnmVO
|
* @param boBsnmVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/deleteBsnmDel", method = RequestMethod.POST)
|
@RequestMapping(value = "/deleteBsnmDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> deleteBsnmDel(MaBsnmVO maBsnmVO) {
|
public ResponseEntity<WnbtResponse> deleteBsnmDel(BOBsnmVO boBsnmVO) {
|
||||||
return responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/deleteBOBsnmDel", maBsnmVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
boBsnmVO.setRegusr(user.getUserInnb());
|
||||||
);
|
boBsnmVO.setUpdusr(user.getUserInnb());
|
||||||
|
Map<String, Object> message = service.deleteBOBsnm(boBsnmVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/deleteBOBsnmDel", maBsnmVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사업자 상세 조회 팝업
|
* 사업자 상세 조회 팝업
|
||||||
* @param maBsnmVO
|
* @param boBsnmVO
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectBsnmInqirePopup")
|
@RequestMapping("/selectBsnmInqirePopup")
|
||||||
public String selectBsnmInqirePopup(MaBsnmVO maBsnmVO,
|
public String selectBsnmInqirePopup(BOBsnmVO boBsnmVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
//사업자 정보 조회
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmDtlInqire", maBsnmVO),
|
List<BOBsnmVO> list = service.selectBOBsnmDtl(boBsnmVO);
|
||||||
model,
|
|
||||||
"resultMap"
|
content.put("BOBsnmVO", boBsnmVO);
|
||||||
);
|
content.put("list", list);
|
||||||
|
|
||||||
|
DataMap map = service.selectGroupCd();
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
codeList.add(map);
|
||||||
|
content.put("codeList", codeList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/bsnm/selectBOBsnmDtlInqire", maBsnmVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/bsnm/MaBsnmInqirePopupR";
|
return "admin/store/bsnm/MaBsnmInqirePopupR";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.wb.domainserver.domain.admin.store.bsnm.vo;
|
package com.wb.domainserver.domain.admin.store.bsnm.vo;
|
||||||
|
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -12,6 +13,7 @@ public class BOBsnmVO extends AbstractVO {
|
|||||||
private String bsnmInnb;
|
private String bsnmInnb;
|
||||||
|
|
||||||
/** 사업자명 */
|
/** 사업자명 */
|
||||||
|
@NotBlank(message = "사업자명")
|
||||||
private String bsnmNm;
|
private String bsnmNm;
|
||||||
|
|
||||||
/** 업태내용 */
|
/** 업태내용 */
|
||||||
@@ -21,24 +23,30 @@ public class BOBsnmVO extends AbstractVO {
|
|||||||
private String itemCn;
|
private String itemCn;
|
||||||
|
|
||||||
/** 사업자등록번호 */
|
/** 사업자등록번호 */
|
||||||
|
@NotBlank(message = "사업자등록번호")
|
||||||
private String bizrnb;
|
private String bizrnb;
|
||||||
|
|
||||||
/** 통신판매업신고번호 */
|
/** 통신판매업신고번호 */
|
||||||
|
@NotBlank(message = "통신판매업 신고번호")
|
||||||
private String mobDclNb;
|
private String mobDclNb;
|
||||||
|
|
||||||
/** 대표자명 */
|
/** 대표자명 */
|
||||||
|
@NotBlank(message = "대표자명")
|
||||||
private String reprsntvnm;
|
private String reprsntvnm;
|
||||||
|
|
||||||
/** 개인정보보호책임자명 */
|
/** 개인정보보호책임자명 */
|
||||||
|
@NotBlank(message = "개인정보 보호책임자명")
|
||||||
private String indvdlinfoPrtcRspnberNm;
|
private String indvdlinfoPrtcRspnberNm;
|
||||||
|
|
||||||
/** 전화번호 */
|
/** 전화번호 */
|
||||||
|
@NotBlank(message = "전화번호")
|
||||||
private String telnb;
|
private String telnb;
|
||||||
|
|
||||||
/** 팩스번호 */
|
/** 팩스번호 */
|
||||||
private String fxnb;
|
private String fxnb;
|
||||||
|
|
||||||
/** 이메일 */
|
/** 이메일 */
|
||||||
|
@NotBlank(message = "이메일")
|
||||||
private String email;
|
private String email;
|
||||||
/** 이메일 ID */
|
/** 이메일 ID */
|
||||||
private String email1;
|
private String email1;
|
||||||
@@ -49,6 +57,7 @@ public class BOBsnmVO extends AbstractVO {
|
|||||||
private String bsnDclNb;
|
private String bsnDclNb;
|
||||||
|
|
||||||
/** 우편번호 */
|
/** 우편번호 */
|
||||||
|
@NotBlank(message = "사업장 주소")
|
||||||
private String zip;
|
private String zip;
|
||||||
|
|
||||||
/** 지번주소 */
|
/** 지번주소 */
|
||||||
|
|||||||
@@ -2,18 +2,26 @@ package com.wb.domainserver.domain.admin.store.extlink.controller;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.store.extlink.service.BOMaExtlinkService;
|
||||||
|
import com.wb.domainserver.domain.admin.store.extlink.vo.BOMaExtlinkVO;
|
||||||
import com.wb.domainserver.domain.admin.store.extlink.vo.MaExtlinkVO;
|
import com.wb.domainserver.domain.admin.store.extlink.vo.MaExtlinkVO;
|
||||||
import com.wb.domainserver.domain.admin.store.mbrgrad.vo.MaMbrgradVO;
|
import com.wb.domainserver.domain.admin.store.mbrgrad.vo.MaMbrgradVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
import com.wb.domainserver.response.WnbtResponseBody;
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
|
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||||
|
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.*;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -42,18 +50,43 @@ public class MaExtlinkController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaExtlinkService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 외부연동 목록 폼
|
* 외부연동 목록 폼
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectExtLinkListForm")
|
@RequestMapping(value = "/selectExtLinkListForm")
|
||||||
public String selectExtLinkListForm(MaExtlinkVO vo, ModelMap model) {
|
public String selectExtLinkListForm(BOMaExtlinkVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtlinkListForm", vo),
|
|
||||||
model,
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
"resultMap"
|
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> extLinkSystemList = new ArrayList<>();
|
||||||
|
extLinkSystemList = service.selectBOextlinkSystemList();
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
content.put("extlinkSystemList", extLinkSystemList);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtlinkListForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/extlink/maExtLinkListForm";
|
return "admin/store/extlink/maExtLinkListForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,12 +96,31 @@ public class MaExtlinkController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectExtLinkListInqire")
|
@RequestMapping("/selectExtLinkListInqire")
|
||||||
public String selectExtLinkListInqire(MaExtlinkVO vo, ModelMap model) {
|
public String selectExtLinkListInqire(BOMaExtlinkVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtlinkList", vo),
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
model,
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
"resultMap"
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
);
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> extLinkList = new ArrayList<>();
|
||||||
|
extLinkList = service.selectBOextlinkList(vo);
|
||||||
|
content.put("resultList", extLinkList);
|
||||||
|
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtlinkList", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/extlink/maExtLinkListR";
|
return "admin/store/extlink/maExtLinkListR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,12 +130,25 @@ public class MaExtlinkController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectExtLinkRegistForm")
|
@RequestMapping("/selectExtLinkRegistForm")
|
||||||
public String selectExtLinkRegistForm(MaExtlinkVO vo, ModelMap model) {
|
public String selectExtLinkRegistForm(BOMaExtlinkVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtLinkRegistForm", vo),
|
List<DataMap> extLinkSystemList = new ArrayList<>();
|
||||||
model,
|
extLinkSystemList = service.selectBOextlinkSystemList();
|
||||||
"resultMap"
|
content.put("extLinkSystemList", extLinkSystemList);
|
||||||
);
|
|
||||||
|
DataMap srchData = new DataMap();
|
||||||
|
srchData.put("srchExtrlNm", vo.getSrchExtrlNm());
|
||||||
|
srchData.put("srchExtrlSystem", vo.getSrchExtrlSystem());
|
||||||
|
srchData.put("pageUnit", vo.getPageUnit());
|
||||||
|
srchData.put("pageIndex", vo.getPageIndex());
|
||||||
|
content.put("srchData", srchData);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtLinkRegistForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/extlink/maExtLinkC";
|
return "admin/store/extlink/maExtLinkC";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,8 +157,8 @@ public class MaExtlinkController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertExtLinkRegist")
|
@RequestMapping(value = "/insertExtLinkRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertExtLinkRegist(MaExtlinkVO vo) {
|
public ResponseEntity<WnbtResponse> insertExtLinkRegist(BOMaExtlinkVO vo) {
|
||||||
List<Map<String, String>> errorList = new ArrayList<>();
|
List<Map<String, String>> errorList = new ArrayList<>();
|
||||||
if (ObjectUtils.isEmpty(vo.getExtrlNm())) {
|
if (ObjectUtils.isEmpty(vo.getExtrlNm())) {
|
||||||
errorList.add(ValidateResultConverter.setErrorMap("extrlNm", "외부연동 명은(는) 필수 입력값입니다."));
|
errorList.add(ValidateResultConverter.setErrorMap("extrlNm", "외부연동 명은(는) 필수 입력값입니다."));
|
||||||
@@ -108,10 +173,21 @@ public class MaExtlinkController {
|
|||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/insertBOExtLinkRegist", vo),
|
vo.setRegusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
);
|
DataMap result = new DataMap();
|
||||||
|
result = service.insertBOExtLinkRegist(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/insertBOExtLinkRegist", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,12 +196,30 @@ public class MaExtlinkController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectExtLinkUpdtForm")
|
@RequestMapping("/selectExtLinkUpdtForm")
|
||||||
public String selectExtLinkUpdtForm(MaExtlinkVO vo, ModelMap model) {
|
public String selectExtLinkUpdtForm(BOMaExtlinkVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtLinkUpdtForm", vo),
|
|
||||||
model,
|
DataMap srchData = new DataMap();
|
||||||
"resultMap"
|
srchData.put("srchExtrlNm", vo.getSrchExtrlNm());
|
||||||
);
|
srchData.put("srchExtrlSystem", vo.getSrchExtrlSystem());
|
||||||
|
srchData.put("pageUnit", vo.getPageUnit());
|
||||||
|
srchData.put("pageIndex", vo.getPageIndex());
|
||||||
|
content.put("srchData", srchData);
|
||||||
|
|
||||||
|
List<DataMap> extLinkSystemList = new ArrayList<>();
|
||||||
|
extLinkSystemList = service.selectBOextlinkSystemList();
|
||||||
|
content.put("extLinkSystemList", extLinkSystemList);
|
||||||
|
|
||||||
|
DataMap extlinkInfo = new DataMap();
|
||||||
|
extlinkInfo = service.selectBOExtLinkUpdtForm(String.valueOf(vo.getExtrlInnb()));
|
||||||
|
content.put("extLink", extlinkInfo);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOExtLinkUpdtForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/extlink/maExtLinkU";
|
return "admin/store/extlink/maExtLinkU";
|
||||||
}
|
}
|
||||||
@@ -135,8 +229,8 @@ public class MaExtlinkController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@PostMapping("/updateExtLinkUpdt")
|
@PostMapping(value = "/updateExtLinkUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateExtLinkUpdt(MaExtlinkVO vo) {
|
public ResponseEntity<WnbtResponse> updateExtLinkUpdt(BOMaExtlinkVO vo) {
|
||||||
List<Map<String, String>> errorList = new ArrayList<>();
|
List<Map<String, String>> errorList = new ArrayList<>();
|
||||||
|
|
||||||
if (ObjectUtils.isEmpty(vo.getExtrlNm())) {
|
if (ObjectUtils.isEmpty(vo.getExtrlNm())) {
|
||||||
@@ -152,10 +246,20 @@ public class MaExtlinkController {
|
|||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/updateBOExtLinkUpdt", vo),
|
vo.setUpdusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
DataMap result = new DataMap();
|
||||||
);
|
result = service.updateBOExtLinkUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/updateBOExtLinkUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -164,11 +268,26 @@ public class MaExtlinkController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value = "/excelFileDownload")
|
@RequestMapping(value = "/excelFileDownload")
|
||||||
public void excelFileDownload(MaMbrgradVO vo, HttpServletResponse response, ModelMap model) {
|
public void excelFileDownload(BOMaExtlinkVO vo, HttpServletResponse response, ModelMap model) {
|
||||||
|
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOexcelFileDownload",vo)
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/selectBOexcelFileDownload",vo)
|
||||||
);
|
// );
|
||||||
|
|
||||||
|
DataMap resultMap = new DataMap();
|
||||||
|
|
||||||
|
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> resultList = new ArrayList<>();
|
||||||
|
resultList = service.selectBOexcelFileDownload(vo);
|
||||||
|
resultMap.put("excelList", resultList);
|
||||||
|
|
||||||
List<Map<String, Object>> excelList = new ArrayList<>();
|
List<Map<String, Object>> excelList = new ArrayList<>();
|
||||||
excelList = (List<Map<String, Object>>) resultMap.get("excelList");
|
excelList = (List<Map<String, Object>>) resultMap.get("excelList");
|
||||||
@@ -219,12 +338,22 @@ public class MaExtlinkController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/deleteExtLinkDel", method = RequestMethod.POST)
|
@RequestMapping(value = "/deleteExtLinkDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> deleteExtLinkDel(MaExtlinkVO vo, ModelMap model) {
|
public ResponseEntity<WnbtResponse> deleteExtLinkDel(BOMaExtlinkVO vo, ModelMap model) {
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
vo.setRegusr(user.getUserInnb());
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
Map<String, Object> message = service.deleteBOExtLinkDel(vo);
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
return ResponseEntity.ok(
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/deleteBOExtLinkDel", vo),
|
WnbtResponse.builder()
|
||||||
ReplyFromResrc::getReply
|
.resBody(new WnbtResponseBody(message))
|
||||||
);
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/extlink/deleteBOExtLinkDel", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.wb.domainserver.domain.admin.store.extlink.vo;
|
package com.wb.domainserver.domain.admin.store.extlink.vo;
|
||||||
|
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ public class BOMaExtlinkVO extends AbstractVO {
|
|||||||
private Integer extrlInnb;
|
private Integer extrlInnb;
|
||||||
|
|
||||||
/** 외부연동 명 */
|
/** 외부연동 명 */
|
||||||
|
@NotNull(message = "외부연동명")
|
||||||
private String extrlNm;
|
private String extrlNm;
|
||||||
|
|
||||||
/** 외부연동 시스템 */
|
/** 외부연동 시스템 */
|
||||||
|
|||||||
@@ -1,18 +1,29 @@
|
|||||||
package com.wb.domainserver.domain.admin.store.mbrgrad.controller;
|
package com.wb.domainserver.domain.admin.store.mbrgrad.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.store.mbrgrad.service.BOMaMbrgradService;
|
||||||
|
import com.wb.domainserver.domain.admin.store.mbrgrad.vo.BOMaMbrgradVO;
|
||||||
import com.wb.domainserver.domain.admin.store.mbrgrad.vo.MaMbrgradVO;
|
import com.wb.domainserver.domain.admin.store.mbrgrad.vo.MaMbrgradVO;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.*;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import com.wb.domainserver.util.file.service.FileStorageService;
|
import com.wb.domainserver.util.file.service.FileStorageService;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -42,18 +53,33 @@ public class MaMbrgradController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WnbtWebClientResponseHandler responseHandler;
|
private WnbtWebClientResponseHandler responseHandler;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaMbrgradService service;
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
@Autowired
|
||||||
|
private BOMaSopmalService sopmalService;
|
||||||
/**select
|
/**select
|
||||||
* 회원 등급 목록 폼
|
* 회원 등급 목록 폼
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectMbrGradListInqireForm")
|
@RequestMapping(value = "/selectMbrGradListInqireForm")
|
||||||
public String selectMbrGradListInqireForm(MaMbrgradVO vo, ModelMap model) {
|
public String selectMbrGradListInqireForm(BOMaMbrgradVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
/*쇼핑몰 조회*/
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradListInqireForm", vo),
|
List<DataMap> sopmalList = new ArrayList<>();
|
||||||
model,
|
sopmalList = sopmalService.selectBOSopmalCdNm();
|
||||||
"resultMap"
|
|
||||||
);
|
DataMap content = new DataMap();
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
content.put("sopmalList", sopmalList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradListInqireForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/mbrgrad/maMbrGradListInqireForm";
|
return "admin/store/mbrgrad/maMbrGradListInqireForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,12 +89,31 @@ public class MaMbrgradController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectMbrGradListInqire")
|
@RequestMapping(value = "/selectMbrGradListInqire")
|
||||||
public String selectMbrGradListInqire(MaMbrgradVO vo, ModelMap model) {
|
public String selectMbrGradListInqire(BOMaMbrgradVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradListInqire", vo),
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
model,
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
"resultMap"
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
);
|
|
||||||
|
vo.setPaginationInfo(paginationInfo);
|
||||||
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
List<DataMap> mbrgradList = new ArrayList<>();
|
||||||
|
mbrgradList = service.selectBOMbrGradList(vo);
|
||||||
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
content.put("resultList", mbrgradList);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/mbrgrad/maMbrGradListInqireR";
|
return "admin/store/mbrgrad/maMbrGradListInqireR";
|
||||||
}
|
}
|
||||||
@@ -79,12 +124,21 @@ public class MaMbrgradController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectMbrGradUpdtForm")
|
@RequestMapping(value="/selectMbrGradUpdtForm")
|
||||||
public String selectMbrGradUpdtForm(MaMbrgradVO vo, ModelMap model) {
|
public String selectMbrGradUpdtForm(BOMaMbrgradVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
/*회원등급그룹 조회*/
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradUpdtForm", vo),
|
Map<String,Object> mbrGradInfo = new HashMap<>();
|
||||||
model,
|
mbrGradInfo = service.selectBOMbrGradUpdtForm(vo);
|
||||||
"resultMap"
|
|
||||||
);
|
Map<String,Object> srchData = new HashMap<>();
|
||||||
|
srchData.put("maMbrGradVO", vo);
|
||||||
|
srchData.put("mbrGradInfo", mbrGradInfo);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", mbrGradInfo);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradUpdtForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/mbrgrad/maMbrGradU";
|
return "admin/store/mbrgrad/maMbrGradU";
|
||||||
}
|
}
|
||||||
@@ -95,8 +149,8 @@ public class MaMbrgradController {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateMbrGradUpdt")
|
@RequestMapping(value = "/updateMbrGradUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> updateMbrGradUpdt(MaMbrgradVO vo, BindingResult bindingResult, HttpServletRequest request) {
|
public ResponseEntity<?> updateMbrGradUpdt(BOMaMbrgradVO vo, BindingResult bindingResult, HttpServletRequest request) {
|
||||||
/*필수 입력 값 체크*/
|
/*필수 입력 값 체크*/
|
||||||
List<Map<String, String>> errorList = new ArrayList<>();
|
List<Map<String, String>> errorList = new ArrayList<>();
|
||||||
if (ObjectUtils.isEmpty(vo.getMbrGradNmArr())) {
|
if (ObjectUtils.isEmpty(vo.getMbrGradNmArr())) {
|
||||||
@@ -114,10 +168,21 @@ public class MaMbrgradController {
|
|||||||
ulpladFileMap = filestore.fileUpload(request); //BDIG로 경로 구분 get
|
ulpladFileMap = filestore.fileUpload(request); //BDIG로 경로 구분 get
|
||||||
vo.setFileInfo(ulpladFileMap);
|
vo.setFileInfo(ulpladFileMap);
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/updateBOMbrGradUpdt", vo),
|
vo.setRegusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result = service.updateBOMbrGradUpdt(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(result))
|
||||||
|
.build()
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/updateBOMbrGradUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,12 +191,21 @@ public class MaMbrgradController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value = "/excelFileDownload")
|
@RequestMapping(value = "/excelFileDownload")
|
||||||
public void excelFileDownload(MaMbrgradVO vo, HttpServletResponse response, ModelMap model) {
|
public void excelFileDownload(BOMaMbrgradVO vo, HttpServletResponse response, ModelMap model) {
|
||||||
vo.setPageIndex(1);
|
vo.setPageIndex(1);
|
||||||
vo.setPageUnit(50);
|
vo.setPageUnit(10000);
|
||||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradListInqire", vo)
|
/*쇼핑몰 조회*/
|
||||||
);
|
List<DataMap> sopmalList = new ArrayList<>();
|
||||||
|
sopmalList = sopmalService.selectBOSopmalCdNm();
|
||||||
|
|
||||||
|
DataMap resultMap = new DataMap();
|
||||||
|
resultMap.put("paramVO", vo);
|
||||||
|
resultMap.put("sopmalList", sopmalList);
|
||||||
|
|
||||||
|
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/mbrgrad/selectBOMbrGradListInqire", vo)
|
||||||
|
// );
|
||||||
|
|
||||||
/*엑셀 데이터 set*/
|
/*엑셀 데이터 set*/
|
||||||
List<Map<String, Object>> excelList = new ArrayList<>();
|
List<Map<String, Object>> excelList = new ArrayList<>();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -17,10 +18,11 @@ public class BOMaMbrgradVO extends AbstractVO {
|
|||||||
|
|
||||||
/**회원등급그룹 고유번호(PK)*/
|
/**회원등급그룹 고유번호(PK)*/
|
||||||
private String mbrGradGroupInnb;
|
private String mbrGradGroupInnb;
|
||||||
/**쇼핑몰코드*/
|
@NotBlank(message = "쇼핑몰")
|
||||||
private String sopmalCd;
|
private String sopmalCd;
|
||||||
/**쇼핑몰이름*/
|
/**쇼핑몰이름*/
|
||||||
private String sopmalNm;
|
private String sopmalNm;
|
||||||
|
@NotBlank(message = "회원등급그룹명")
|
||||||
/**회원등급그룹명*/
|
/**회원등급그룹명*/
|
||||||
private String mbrGradGroupNm;
|
private String mbrGradGroupNm;
|
||||||
/**산정기간월수*/
|
/**산정기간월수*/
|
||||||
@@ -33,6 +35,7 @@ public class BOMaMbrgradVO extends AbstractVO {
|
|||||||
private String gradMdatCycleMtCnt;
|
private String gradMdatCycleMtCnt;
|
||||||
/**사용여부*/
|
/**사용여부*/
|
||||||
private String useAt;
|
private String useAt;
|
||||||
|
|
||||||
/**회원등급 고유번호(PK)*/
|
/**회원등급 고유번호(PK)*/
|
||||||
private String mbrGradInnb;
|
private String mbrGradInnb;
|
||||||
/**쿠폰팩 고유번호(FK)*/
|
/**쿠폰팩 고유번호(FK)*/
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
package com.wb.domainserver.domain.admin.store.sopmal.controller;
|
package com.wb.domainserver.domain.admin.store.sopmal.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||||
import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
||||||
import com.wb.domainserver.domain.admin.store.sopmal.vo.MaSopmalVO;
|
import com.wb.domainserver.domain.admin.store.sopmal.vo.MaSopmalVO;
|
||||||
import com.wb.domainserver.domain.admin.sys.authgrp.vo.MaAuthgrpVO;
|
import com.wb.domainserver.domain.admin.sys.authgrp.vo.MaAuthgrpVO;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.*;
|
||||||
@@ -18,6 +25,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -52,9 +60,6 @@ import java.util.regex.Pattern;
|
|||||||
@RequestMapping("/admin/store/sopmal")
|
@RequestMapping("/admin/store/sopmal")
|
||||||
public class MaSopmalController {
|
public class MaSopmalController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BOMaSopmalService service;
|
|
||||||
|
|
||||||
/** WebClient 호출을 위한 wrapper */
|
/** WebClient 호출을 위한 wrapper */
|
||||||
@Autowired
|
@Autowired
|
||||||
private WnbtWebClientResponseHandler responseHandler;
|
private WnbtWebClientResponseHandler responseHandler;
|
||||||
@@ -66,19 +71,53 @@ public class MaSopmalController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaSopmalService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService bOMaComncdService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 쇼핑몰 목록 조회
|
* 쇼핑몰 목록 조회
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopmalListForm")
|
@RequestMapping("/selectSopmalListForm")
|
||||||
public String selectSopmalListForm(MaSopmalVO vo, ModelMap model) {
|
public String selectSopmalListForm(BOMaSopmalVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
// 페이징
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
vo.setPaginationInfo(paginationInfo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalListInqireForm", vo),
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
model,
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
"resultMap"
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
);
|
|
||||||
|
List<DataMap> companyAllList = new ArrayList<>();
|
||||||
|
companyAllList = service.selectBOCompanyAllList();
|
||||||
|
content.put("companyAllList", companyAllList);
|
||||||
|
|
||||||
|
BOMaComncdVO cdVO = new BOMaComncdVO();
|
||||||
|
List<DataMap> sopmalTyCdList = new ArrayList<>();
|
||||||
|
cdVO.setGroupCd("SOPMAL_TY");
|
||||||
|
sopmalTyCdList = service.selectCommCode(cdVO);
|
||||||
|
content.put("sopmalTyCdList", sopmalTyCdList);
|
||||||
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalListInqireForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/sopmal/maSopmalListInqireForm";
|
return "admin/store/sopmal/maSopmalListInqireForm";
|
||||||
}
|
}
|
||||||
@@ -88,13 +127,32 @@ public class MaSopmalController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopmalListInqire")
|
@RequestMapping("/selectSopmalListInqire")
|
||||||
public String selectSopmalListInqire(MaSopmalVO vo, ModelMap model) {
|
public String selectSopmalListInqire(BOMaSopmalVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
vo.setPaginationInfo(paginationInfo);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalListInqire", vo),
|
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
model,
|
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
"resultMap"
|
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
);
|
|
||||||
|
content.put("paramVO", vo);
|
||||||
|
|
||||||
|
List<DataMap> sopmalList = new ArrayList<>();
|
||||||
|
sopmalList = service.selectBOSopmalList(vo);
|
||||||
|
content.put("sopmalList", sopmalList);
|
||||||
|
|
||||||
|
content.put("paginationInfo", vo.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalListInqire", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/sopmal/maSopmalListInqireR";
|
return "admin/store/sopmal/maSopmalListInqireR";
|
||||||
}
|
}
|
||||||
@@ -105,13 +163,83 @@ public class MaSopmalController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopmalRegistForm")
|
@RequestMapping("/selectSopmalRegistForm")
|
||||||
public String selectSopmalRegistForm(MaSopmalVO vo, ModelMap model) {
|
public String selectSopmalRegistForm(BOMaSopmalVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
List<DataMap> srchList = new ArrayList<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalRegistForm", vo),
|
DataMap srchMap = new DataMap();
|
||||||
model,
|
srchMap.put("srchType", vo.getSrchType());
|
||||||
"resultMap"
|
srchMap.put("srchStr", vo.getSrchStr());
|
||||||
);
|
srchMap.put("srchSopmalTyCd", vo.getSrchSopmalTyCd());
|
||||||
|
srchMap.put("srchBsnmInnb", vo.getSrchBsnmInnb());
|
||||||
|
srchMap.put("srchOperAt", vo.getSrchOperAt());
|
||||||
|
srchMap.put("pageUnit", vo.getPageUnit());
|
||||||
|
srchMap.put("pageIndex", vo.getPageIndex());
|
||||||
|
srchList.add(srchMap);
|
||||||
|
content.put("srchList", srchList);
|
||||||
|
|
||||||
|
List<DataMap> companyAllList = new ArrayList<>();
|
||||||
|
companyAllList = service.selectBOCompanyAllList();
|
||||||
|
content.put("companyAllList", companyAllList);
|
||||||
|
|
||||||
|
/** 회원등급 삭제 7.2 */
|
||||||
|
// List<DataMap> mbrGradList = new ArrayList<>();
|
||||||
|
// mbrGradList = service.selectBOMbrGradList();
|
||||||
|
// content.put("mbrGradList", mbrGradList);
|
||||||
|
|
||||||
|
List<DataMap> themeList = new ArrayList<>();
|
||||||
|
themeList = service.selectBOThemeList();
|
||||||
|
content.put("themeList", themeList);
|
||||||
|
|
||||||
|
List<DataMap> CGN002 = new ArrayList<>();
|
||||||
|
DataMap dm = new DataMap();
|
||||||
|
dm.put("groupCd", "STPLAT_DV");
|
||||||
|
CGN002 = service.selectBOCommcdClauseDetailList(dm);
|
||||||
|
content.put("CGN002", CGN002);
|
||||||
|
|
||||||
|
List<DataMap> clause01List = new ArrayList<>();
|
||||||
|
DataMap cl01 = new DataMap();
|
||||||
|
cl01.put("stplatDvCd", "01");
|
||||||
|
clause01List = service.selectBOClauseList(cl01);
|
||||||
|
content.put("clause01List", clause01List);
|
||||||
|
|
||||||
|
List<DataMap> clause02List = new ArrayList<>();
|
||||||
|
DataMap cl02 = new DataMap();
|
||||||
|
cl02.put("stplatDvCd", "02");
|
||||||
|
clause02List = service.selectBOClauseList(cl02);
|
||||||
|
content.put("clause02List", clause02List);
|
||||||
|
|
||||||
|
BOMaComncdVO cdVO = new BOMaComncdVO();
|
||||||
|
|
||||||
|
List<DataMap> pgList = new ArrayList<>();
|
||||||
|
cdVO.setGroupCd("SETLE_SETUP_TY");
|
||||||
|
pgList = service.selectCommCode(cdVO);
|
||||||
|
content.put("pgList", pgList);
|
||||||
|
|
||||||
|
List<DataMap> sopmalTyCdList = new ArrayList<>();
|
||||||
|
cdVO.setGroupCd("SOPMAL_TY");
|
||||||
|
sopmalTyCdList = service.selectCommCode(cdVO);
|
||||||
|
content.put("sopmalTyCdList", sopmalTyCdList);
|
||||||
|
|
||||||
|
// List<DataMap> mlgMxmmUseDvList = new ArrayList<>();
|
||||||
|
// cdVO.setGroupCd("MLG_MXMM_USE_DV");
|
||||||
|
// mlgMxmmUseDvList = service.selectCommCode(cdVO);
|
||||||
|
// content.put("mlgMxmmUseDvList", mlgMxmmUseDvList);
|
||||||
|
|
||||||
|
List<DataMap> CGN001 = new ArrayList<>();
|
||||||
|
cdVO.setGroupCd("EMAIL_ADRES");
|
||||||
|
CGN001 = service.selectCommCode(cdVO);
|
||||||
|
content.put("CGN001", CGN001);
|
||||||
|
|
||||||
|
DataMap extrlList = service.selectBOExtrlList();
|
||||||
|
content.put("extrlList", extrlList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalRegistForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/sopmal/maSopmalC";
|
return "admin/store/sopmal/maSopmalC";
|
||||||
}
|
}
|
||||||
@@ -121,8 +249,8 @@ public class MaSopmalController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertSopmalRegist")
|
@RequestMapping(value = "/insertSopmalRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertSopmalRegist(@Validated MaSopmalVO vo, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> insertSopmalRegist(@Validated BOMaSopmalVO vo, BindingResult bindingResult) {
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
@@ -158,10 +286,21 @@ public class MaSopmalController {
|
|||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/insertBOSopmalRegist", vo),
|
vo.setRegusr(user.getUserInnb());
|
||||||
ReplyFromResrc::getReply
|
|
||||||
);
|
DataMap content = new DataMap();
|
||||||
|
content = service.insertBOSopmalRegist(vo);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/insertBOSopmalRegist", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -170,13 +309,115 @@ public class MaSopmalController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopmalUpdtForm")
|
@RequestMapping("/selectSopmalUpdtForm")
|
||||||
public String selectSopmalUpdtForm(MaSopmalVO vo, ModelMap model) {
|
public String selectSopmalUpdtForm(BOMaSopmalVO vo, ModelMap model) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
List<DataMap> srchList = new ArrayList<>();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalUpdtForm", vo),
|
DataMap srchMap = new DataMap();
|
||||||
model,
|
srchMap.put("srchType", vo.getSrchType());
|
||||||
"resultMap"
|
srchMap.put("srchStr", vo.getSrchStr());
|
||||||
);
|
srchMap.put("srchSopmalTyCd", vo.getSrchSopmalTyCd());
|
||||||
|
srchMap.put("srchBsnmInnb", vo.getSrchBsnmInnb());
|
||||||
|
srchMap.put("srchOperAt", vo.getSrchOperAt());
|
||||||
|
srchMap.put("pageUnit", vo.getPageUnit());
|
||||||
|
srchMap.put("pageIndex", vo.getPageIndex());
|
||||||
|
srchList.add(srchMap);
|
||||||
|
content.put("srchList", srchList);
|
||||||
|
|
||||||
|
List<DataMap> companyAllList = new ArrayList<>();
|
||||||
|
companyAllList = service.selectBOCompanyAllList();
|
||||||
|
content.put("companyAllList", companyAllList);
|
||||||
|
|
||||||
|
/** 회원등급 삭제 7.2 */
|
||||||
|
// List<DataMap> mbrGradList = new ArrayList<>();
|
||||||
|
// mbrGradList = service.selectBOMbrGradList();
|
||||||
|
// content.put("mbrGradList", mbrGradList);
|
||||||
|
|
||||||
|
List<DataMap> themeList = new ArrayList<>();
|
||||||
|
themeList = service.selectBOThemeList();
|
||||||
|
content.put("themeList", themeList);
|
||||||
|
|
||||||
|
List<DataMap> CGN002 = new ArrayList<>();
|
||||||
|
DataMap dm = new DataMap();
|
||||||
|
dm.put("groupCd", "STPLAT_DV");
|
||||||
|
CGN002 = service.selectBOCommcdClauseDetailList(dm);
|
||||||
|
content.put("CGN002", CGN002);
|
||||||
|
|
||||||
|
List<DataMap> clause01List = new ArrayList<>();
|
||||||
|
DataMap cl01 = new DataMap();
|
||||||
|
cl01.put("stplatDvCd", "01");
|
||||||
|
clause01List = service.selectBOClauseList(cl01);
|
||||||
|
content.put("clause01List", clause01List);
|
||||||
|
|
||||||
|
List<DataMap> clause02List = new ArrayList<>();
|
||||||
|
DataMap cl02 = new DataMap();
|
||||||
|
cl02.put("stplatDvCd", "02");
|
||||||
|
clause02List = service.selectBOClauseList(cl02);
|
||||||
|
content.put("clause02List", clause02List);
|
||||||
|
|
||||||
|
BOMaComncdVO cdVO = new BOMaComncdVO();
|
||||||
|
|
||||||
|
List<DataMap> pgList = new ArrayList<>();
|
||||||
|
cdVO.setGroupCd("SETLE_SETUP_TY");
|
||||||
|
pgList = service.selectCommCode(cdVO);
|
||||||
|
content.put("pgList", pgList);
|
||||||
|
|
||||||
|
List<DataMap> CGN001 = new ArrayList<>();
|
||||||
|
cdVO.setGroupCd("EMAIL_ADRES");
|
||||||
|
CGN001 = service.selectCommCode(cdVO);
|
||||||
|
content.put("CGN001", CGN001);
|
||||||
|
|
||||||
|
// List<DataMap> mlgMxmmUseDvList = new ArrayList<>();
|
||||||
|
// cdVO.setGroupCd("MLG_MXMM_USE_DV");
|
||||||
|
// mlgMxmmUseDvList = service.selectCommCode(cdVO);
|
||||||
|
// content.put("mlgMxmmUseDvList", mlgMxmmUseDvList);
|
||||||
|
|
||||||
|
List<DataMap> sopmalTyCdList = new ArrayList<>();
|
||||||
|
cdVO.setGroupCd("SOPMAL_TY");
|
||||||
|
sopmalTyCdList = service.selectCommCode(cdVO);
|
||||||
|
content.put("sopmalTyCdList", sopmalTyCdList);
|
||||||
|
|
||||||
|
List<DataMap> sopmalDetailList = new ArrayList<>();
|
||||||
|
sopmalDetailList = service.selectBOSopmalUpdtForm(vo);
|
||||||
|
content.put("sopmalDetailList", sopmalDetailList);
|
||||||
|
|
||||||
|
List<DataMap> clauseList = new ArrayList<>();
|
||||||
|
clauseList = service.selectBOSopmalUpdtFormClauseList(vo);
|
||||||
|
content.put("clauseList", clauseList);
|
||||||
|
|
||||||
|
List<DataMap> sitelList = new ArrayList<>();
|
||||||
|
sitelList = service.selectBOSopmalUpdtFormSitelList(vo);
|
||||||
|
content.put("sitelList", sitelList);
|
||||||
|
|
||||||
|
List<DataMap> companyList = new ArrayList<>();
|
||||||
|
companyList = service.selectBOSopmalUpdtFormCompanyList(vo);
|
||||||
|
content.put("companyList", companyList);
|
||||||
|
|
||||||
|
/** 회원등급 삭제 7.2 */
|
||||||
|
// DataMap mbrGradByShop = service.selectBOMbrGradGroupByShop(vo);
|
||||||
|
// content.put("mbrGradByShop", mbrGradByShop);
|
||||||
|
|
||||||
|
/*DataMap extrlByShop = service.selectBOExtrlByShop(vo);
|
||||||
|
content.put("extrlByShop", extrlByShop);
|
||||||
|
|
||||||
|
DataMap extrlList = service.selectBOExtrlList();
|
||||||
|
content.put("extrlList", extrlList);*/
|
||||||
|
|
||||||
|
DataMap payLinkList = service.selectBOShopPayLinkList(vo);
|
||||||
|
content.put("payLinkList", payLinkList);
|
||||||
|
|
||||||
|
if(payLinkList != null){
|
||||||
|
List<DataMap> payInfoList = service.selectBOpayInfoList(payLinkList);
|
||||||
|
content.put("payInfoList", payInfoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
log.debug("content result {}", content);
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalUpdtForm", vo),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/sopmal/maSopmalU";
|
return "admin/store/sopmal/maSopmalU";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,8 +426,8 @@ public class MaSopmalController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateSopmalUpdt")
|
@RequestMapping(value = "/updateSopmalUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateSopmalUpdt(@Validated MaSopmalVO vo, BindingResult bindingResult, HttpServletRequest request) {
|
public ResponseEntity<WnbtResponse> updateSopmalUpdt(@Validated BOMaSopmalVO vo, BindingResult bindingResult, HttpServletRequest request) {
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
@@ -215,13 +456,25 @@ public class MaSopmalController {
|
|||||||
vo.setMlgMxmmUseAmt("0");
|
vo.setMlgMxmmUseAmt("0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
vo.setUpdusr(user.getUserInnb());
|
||||||
|
log.debug("updateBOSopmalUpdt controller {}", vo.getJoinComptWords());
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.updateBOSopmalUpdt(vo);
|
||||||
|
|
||||||
if(errorList != null && !errorList.isEmpty()) {
|
if(errorList != null && !errorList.isEmpty()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/updateBOSopmalUpdt", vo),
|
return ResponseEntity.ok(
|
||||||
ReplyFromResrc::getReply
|
WnbtResponse.builder()
|
||||||
);
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/updateBOSopmalUpdt", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -229,13 +482,23 @@ public class MaSopmalController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectSubClauseList")
|
@RequestMapping(value = "/selectSubClauseList", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateSopmalUpdt(MaSopmalVO vo) {
|
public ResponseEntity<WnbtResponse> updateSopmalUpdt(BOMaSopmalVO vo) {
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSubClauseList", vo),
|
List<DataMap> clauseList = new ArrayList<>();
|
||||||
ReplyFromResrc::getReply
|
clauseList = service.selectBOSubClauseList(vo);
|
||||||
);
|
|
||||||
|
content.put("clauseList", clauseList);
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSubClauseList", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -244,12 +507,18 @@ public class MaSopmalController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectBusinessInformation")
|
@RequestMapping(value = "/selectBusinessInformation")
|
||||||
public String selectBusinessInformation(MaSopmalVO vo, ModelMap model) {
|
public String selectBusinessInformation(BOMaSopmalVO vo, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOBusinessInformation", vo),
|
List<DataMap> list = new ArrayList<>();
|
||||||
model,
|
list = service.selectBOBusinessInformation(vo);
|
||||||
"resultSrchMap"
|
content.put("list", list);
|
||||||
);
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOBusinessInformation", vo),
|
||||||
|
// model,
|
||||||
|
// "resultSrchMap"
|
||||||
|
// );
|
||||||
return "admin/store/sopmal/MaBsnmInqirePopupR";
|
return "admin/store/sopmal/MaBsnmInqirePopupR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,12 +527,29 @@ public class MaSopmalController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectClauseInformation")
|
@RequestMapping(value = "/selectClauseInformation", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectClauseInformation(MaSopmalVO vo) {
|
public ResponseEntity<WnbtResponse> selectClauseInformation(BOMaSopmalVO vo) {
|
||||||
return responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOClauseInformation", vo),
|
List<DataMap> clauseList = new ArrayList<>();
|
||||||
ReplyFromResrc::getReply
|
clauseList = service.selectBOClauseInformation(vo);
|
||||||
);
|
|
||||||
|
/** 은행 구분, 은행 코드 이름, 계좌 구분 조회*/
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("STPLAT_DV");
|
||||||
|
List<?> stplat = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
content.put("clauseList", clauseList);
|
||||||
|
content.put("stplat", stplat);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOClauseInformation", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -271,8 +557,8 @@ public class MaSopmalController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectSopmalCdduplicat")
|
@RequestMapping(value = "/selectSopmalCdduplicat", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectSopmalCdduplicat(MaSopmalVO vo) {
|
public ResponseEntity<WnbtResponse> selectSopmalCdduplicat(BOMaSopmalVO vo) {
|
||||||
|
|
||||||
List<Map<String, String>> errorList = new ArrayList<>();
|
List<Map<String, String>> errorList = new ArrayList<>();
|
||||||
final String REGEX_CD = "^[a-zA-Z\\s]*$";
|
final String REGEX_CD = "^[a-zA-Z\\s]*$";
|
||||||
@@ -283,10 +569,20 @@ public class MaSopmalController {
|
|||||||
if(errorList != null && !errorList.isEmpty()) {
|
if(errorList != null && !errorList.isEmpty()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalCdduplicat", vo),
|
DataMap content = new DataMap();
|
||||||
ReplyFromResrc::getReply
|
String message = service.selectBOSopmalCdduplicat(vo);
|
||||||
);
|
content.put("message", message);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOSopmalCdduplicat", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -362,17 +658,20 @@ public class MaSopmalController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value = "/selectJoinInfo")
|
@RequestMapping(value = "/selectJoinInfo", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> selectJoinInfo(MaSopmalVO vo) {
|
public ResponseEntity<WnbtResponse> selectJoinInfo(BOMaSopmalVO vo) {
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content.put("joinInfo", service.selectBOJoinInfo(vo));
|
||||||
|
|
||||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
return ResponseEntity.ok(
|
||||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOJoinInfo", vo)
|
WnbtResponse.builder()
|
||||||
// );
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOJoinInfo", vo),
|
|
||||||
ReplyFromResrc::getReply
|
|
||||||
);
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopmal/selectBOJoinInfo", vo),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -51,6 +52,8 @@ public class BOMaSopmalVO extends AbstractVO {
|
|||||||
|
|
||||||
/*대표자 이메일*/
|
/*대표자 이메일*/
|
||||||
private String reprsntEmail;
|
private String reprsntEmail;
|
||||||
|
private String reprsntId;
|
||||||
|
private String reprsntDomain;
|
||||||
/*대표자 전화번호*/
|
/*대표자 전화번호*/
|
||||||
private String reprsntTelnb;
|
private String reprsntTelnb;
|
||||||
|
|
||||||
@@ -63,41 +66,54 @@ public class BOMaSopmalVO extends AbstractVO {
|
|||||||
private String mbrGradGroupInnb;
|
private String mbrGradGroupInnb;
|
||||||
|
|
||||||
/** 테마 고유번호 */
|
/** 테마 고유번호 */
|
||||||
|
@NotBlank(message = "테마")
|
||||||
private String themaInnb;
|
private String themaInnb;
|
||||||
|
|
||||||
/** 쇼핑몰명 */
|
/** 쇼핑몰명 */
|
||||||
|
@NotBlank(message = "쇼핑몰명")
|
||||||
private String sopmalNm;
|
private String sopmalNm;
|
||||||
|
|
||||||
/** 자사몰, 독립몰 */
|
/** 자사몰, 독립몰 */
|
||||||
|
@NotBlank(message = "구분")
|
||||||
private String sopmalTyCd;
|
private String sopmalTyCd;
|
||||||
|
|
||||||
/** PC도메인주소 */
|
/** PC도메인주소 */
|
||||||
|
@NotBlank(message = "PC도메인주소")
|
||||||
private String pcDomnAdres;
|
private String pcDomnAdres;
|
||||||
|
|
||||||
/** 모바일도메인주소 */
|
/** 모바일도메인주소 */
|
||||||
|
@NotBlank(message = "모바일도메인주소")
|
||||||
private String mblDomnAdres;
|
private String mblDomnAdres;
|
||||||
|
|
||||||
/** 파비콘경로 */
|
/** 파비콘경로 */
|
||||||
|
@NotBlank(message = "파비콘경로")
|
||||||
private String fviconCours;
|
private String fviconCours;
|
||||||
|
|
||||||
/** 대체URL */
|
/** 대체URL */
|
||||||
|
@NotBlank(message = "대체URL")
|
||||||
private String rplcUrl;
|
private String rplcUrl;
|
||||||
|
|
||||||
/** 이메일 자동발송 발신주소 */
|
/** 이메일 자동발송 발신주소 */
|
||||||
|
@NotBlank(message = "이메일 자동발송 발신주소")
|
||||||
private String emailAtmcSndngDsptchAdres;
|
private String emailAtmcSndngDsptchAdres;
|
||||||
|
|
||||||
/** SMS 자동발송 발신번호 */
|
/** SMS 자동발송 발신번호 */
|
||||||
|
@NotBlank(message = "SMS 자동발송 발신번호")
|
||||||
private String smsAtmcSndngDsptchNb;
|
private String smsAtmcSndngDsptchNb;
|
||||||
|
|
||||||
/** SMS 자동발송제한 시작시간 */
|
/** SMS 자동발송제한 시작시간 */
|
||||||
|
@NotBlank(message = "SMS 자동발송제한 시작시간")
|
||||||
private String smsAtmcSndngLmttBgntme;
|
private String smsAtmcSndngLmttBgntme;
|
||||||
|
|
||||||
/** SMS 자동발송제한 종료시간 */
|
/** SMS 자동발송제한 종료시간 */
|
||||||
|
@NotBlank(message = "SMS 자동발송제한 종료시간")
|
||||||
private String smsAtmcSndngLmttEndtme;
|
private String smsAtmcSndngLmttEndtme;
|
||||||
|
|
||||||
/** 운영여부 */
|
/** 운영여부 */
|
||||||
|
@NotBlank(message = "운영여부")
|
||||||
private String operAt;
|
private String operAt;
|
||||||
|
|
||||||
|
|
||||||
/** 외부 연동 */
|
/** 외부 연동 */
|
||||||
/** 카카오 로그인 */
|
/** 카카오 로그인 */
|
||||||
private String kakaoIntrlckAt;
|
private String kakaoIntrlckAt;
|
||||||
@@ -248,6 +264,8 @@ public class BOMaSopmalVO extends AbstractVO {
|
|||||||
|
|
||||||
/** 이메일 */
|
/** 이메일 */
|
||||||
private String email;
|
private String email;
|
||||||
|
private String id;
|
||||||
|
private String domain;
|
||||||
|
|
||||||
/** 영업신고번호 */
|
/** 영업신고번호 */
|
||||||
private String bsnDclNb;
|
private String bsnDclNb;
|
||||||
@@ -449,6 +467,10 @@ public class BOMaSopmalVO extends AbstractVO {
|
|||||||
private DataMap codeMap;
|
private DataMap codeMap;
|
||||||
private List<DataMap> codeList;
|
private List<DataMap> codeList;
|
||||||
|
|
||||||
|
/** 중복 체크 및 정합성검사 용 */
|
||||||
|
private String isChkdDup;
|
||||||
|
private String isChkdStplat;
|
||||||
|
|
||||||
/** pc 결제정보 List */
|
/** pc 결제정보 List */
|
||||||
private String pcSetleTypeList;
|
private String pcSetleTypeList;
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,26 @@
|
|||||||
package com.wb.domainserver.domain.admin.store.sopthema.controller;
|
package com.wb.domainserver.domain.admin.store.sopthema.controller;
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopthema.service.BOSopthemaService;
|
||||||
|
import com.wb.domainserver.domain.admin.store.sopthema.vo.BOSopThemaVO;
|
||||||
import com.wb.domainserver.domain.admin.store.sopthema.vo.MaSopThemaVO;
|
import com.wb.domainserver.domain.admin.store.sopthema.vo.MaSopThemaVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.exception.code.ErrorCode;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.*;
|
import com.wb.domainserver.util.communicate.*;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -18,6 +29,10 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 쇼핑몰 테마 관리 Controller
|
* 쇼핑몰 테마 관리 Controller
|
||||||
*
|
*
|
||||||
@@ -49,21 +64,32 @@ public class MaSopthemaController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOSopthemaService service;
|
||||||
|
@Autowired
|
||||||
|
private BOMaSopmalService boMaSopmalService;
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 쇼핑몰 테마 목록 조회
|
* 쇼핑몰 테마 목록 조회
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopThemaListInqireForm")
|
@RequestMapping("/selectSopThemaListInqireForm")
|
||||||
public String selectSopThemaListInqireForm(MaSopThemaVO maSopthemaVO,
|
public String selectSopThemaListInqireForm(BOSopThemaVO boSopthemaVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> reulstMap = new HashMap<>();
|
||||||
|
|
||||||
//BO 발송그룹 목록조회 API 호출
|
List<?> SopmalCdNmList = boMaSopmalService.selectBOSopmalCdNm();
|
||||||
responseHandler.handleResponse(
|
reulstMap.put("SopmalCdNmList", SopmalCdNmList); //검색조건 > 쇼핑몰
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaListInqireForm", maSopthemaVO),
|
reulstMap.put("BOSopThemaVO", boSopthemaVO);
|
||||||
model,
|
|
||||||
"resultMap"
|
model.addAttribute("resultMap", reulstMap);
|
||||||
);
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaListInqireForm", maSopthemaVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/sopthema/MaSopThemaListInqireRForm";
|
return "admin/store/sopthema/MaSopThemaListInqireRForm";
|
||||||
}
|
}
|
||||||
@@ -74,23 +100,41 @@ public class MaSopthemaController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopThemaListInqire")
|
@RequestMapping("/selectSopThemaListInqire")
|
||||||
public String selectSopThemaListInqire(MaSopThemaVO maSopthemaVO,
|
public String selectSopThemaListInqire(BOSopThemaVO boSopthemaVO, ModelMap model) {
|
||||||
ModelMap model) {
|
|
||||||
|
|
||||||
//BO 발송그룹 목록조회 API 호출
|
//BO 발송그룹 목록조회 API 호출
|
||||||
try {
|
try {
|
||||||
log.debug("It's excuted!");
|
Map<String, Object> content = new HashMap<>();
|
||||||
responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaListInqire", maSopthemaVO),
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
model,
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
"resultMap"
|
paginationInfo.setCurrentPageNo(boSopthemaVO.getPageIndex());
|
||||||
);
|
paginationInfo.setRecordCountPerPage(boSopthemaVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
boSopthemaVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
boSopthemaVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
boSopthemaVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
boSopthemaVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//쇼핑몰 테마 목록조회
|
||||||
|
List<DataMap> list = service.selectBOSopThemaList(boSopthemaVO);
|
||||||
|
|
||||||
|
content.put("BOSopThemaVO", boSopthemaVO);
|
||||||
|
content.put("paginationInfo", boSopthemaVO.getPaginationInfo());
|
||||||
|
content.put("list", list);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaListInqire", maSopthemaVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
e.printStackTrace();
|
log.error(e.getMessage());
|
||||||
|
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
//BO 발송그룹 목록조회 API 결과를 Map으로 변환하여 설정
|
|
||||||
|
|
||||||
|
|
||||||
return "admin/store/sopthema/MaSopThemaListInqireR";
|
return "admin/store/sopthema/MaSopThemaListInqireR";
|
||||||
}
|
}
|
||||||
@@ -101,15 +145,33 @@ public class MaSopthemaController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopThemaRegistForm")
|
@RequestMapping("/selectSopThemaRegistForm")
|
||||||
public String selectSopThemaRegistForm(MaSopThemaVO maSopthemaVO,
|
public String selectSopThemaRegistForm(BOSopThemaVO boSopthemaVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(boSopthemaVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(boSopthemaVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
boSopthemaVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
//BO 발송그룹 목록조회 API 호출
|
//페이징 처리를 위한 값 설정
|
||||||
responseHandler.handleResponse(
|
boSopthemaVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaListInqire", maSopthemaVO),
|
boSopthemaVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
model,
|
boSopthemaVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
"resultMap"
|
|
||||||
);
|
//쇼핑몰 테마 목록조회
|
||||||
|
List<DataMap> list = service.selectBOSopThemaList(boSopthemaVO);
|
||||||
|
|
||||||
|
content.put("BOSopThemaVO", boSopthemaVO);
|
||||||
|
content.put("paginationInfo", boSopthemaVO.getPaginationInfo());
|
||||||
|
content.put("list", list);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaListInqire", maSopthemaVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/sopthema/MaSopThemaRegistC";
|
return "admin/store/sopthema/MaSopThemaRegistC";
|
||||||
}
|
}
|
||||||
@@ -120,14 +182,20 @@ public class MaSopthemaController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectSopThemaUpdtForm")
|
@RequestMapping("/selectSopThemaUpdtForm")
|
||||||
public String selectSopThemaUpdtForm(MaSopThemaVO maSopthemaVO,
|
public String selectSopThemaUpdtForm(BOSopThemaVO boSopthemaVO, ModelMap model) {
|
||||||
ModelMap model) {
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
//쇼핑몰 테마 상세 정보 조회
|
||||||
|
List<BOSopThemaVO> list = service.selectBOSopthemaDtl(boSopthemaVO);
|
||||||
|
|
||||||
responseHandler.handleResponse(
|
content.put("BOSopThemaVO", boSopthemaVO);
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaDtlInqire", maSopthemaVO),
|
content.put("list", list);
|
||||||
model,
|
|
||||||
"resultMap"
|
model.addAttribute("resultMap", content);
|
||||||
);
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/selectBOSopThemaDtlInqire", maSopthemaVO),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
return "admin/store/sopthema/MaSopThemaUpdtU";
|
return "admin/store/sopthema/MaSopThemaUpdtU";
|
||||||
}
|
}
|
||||||
@@ -137,16 +205,27 @@ public class MaSopthemaController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertSopThemaRegist", method = RequestMethod.POST)
|
@RequestMapping(value = "/insertSopThemaRegist", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertSopThemaRegist(@Validated MaSopThemaVO maSopthemaVO, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> insertSopThemaRegist(@Validated BOSopThemaVO boSopthemaVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/insertBOSopThemaRegist", maSopthemaVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
boSopthemaVO.setRegusr(user.getUserInnb());
|
||||||
);
|
boSopthemaVO.setUpdusr(user.getUserInnb());
|
||||||
|
// 쇼핑몰 테마 등록
|
||||||
|
Map<String, Object> message = service.insertBOSopThema(boSopthemaVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/insertBOSopThemaRegist", maSopthemaVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -154,16 +233,28 @@ public class MaSopthemaController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateSopThemaUpdt", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateSopThemaUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateSopThemaUpdt(@Validated MaSopThemaVO maSopthemaVO, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> updateSopThemaUpdt(@Validated BOSopThemaVO boSopthemaVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
//사용자 정보 추출 및 적용
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/updateBOSopThemaUpdt", maSopthemaVO),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
boSopthemaVO.setRegusr(user.getUserInnb());
|
||||||
);
|
boSopthemaVO.setUpdusr(user.getUserInnb());
|
||||||
|
// 쇼핑몰 테마 수정
|
||||||
|
Map<String, Object> message = service.updateBOSopThema(boSopthemaVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(message))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/updateBOSopThemaUpdt", maSopthemaVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,12 +262,23 @@ public class MaSopthemaController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/deleteSopThemaDel", method = RequestMethod.POST)
|
@RequestMapping(value = "/deleteSopThemaDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> deleteSopThemaDel(MaSopThemaVO maSopthemaVO) {
|
public ResponseEntity<WnbtResponse> deleteSopThemaDel(BOSopThemaVO boSopthemaVO) {
|
||||||
|
//사용자 정보 추출 및 적용
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
boSopthemaVO.setRegusr(user.getUserInnb());
|
||||||
|
boSopthemaVO.setUpdusr(user.getUserInnb());
|
||||||
|
// 쇼핑몰 테마 삭제
|
||||||
|
Map<String, Object> message = service.deleteBOSopthema(boSopthemaVO);
|
||||||
|
|
||||||
return responseHandler.handleResponse(
|
return ResponseEntity.ok(
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/deleteBOSopThemaDel", maSopthemaVO),
|
WnbtResponse.builder()
|
||||||
ReplyFromResrc::getReply
|
.resBody(new WnbtResponseBody(message))
|
||||||
);
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/sopthema/deleteBOSopThemaDel", maSopthemaVO),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.wb.domainserver.domain.admin.store.sopthema.vo;
|
package com.wb.domainserver.domain.admin.store.sopthema.vo;
|
||||||
|
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -12,9 +13,11 @@ public class BOSopThemaVO extends AbstractVO {
|
|||||||
private Integer themaInnb;
|
private Integer themaInnb;
|
||||||
|
|
||||||
/** 테마명 */
|
/** 테마명 */
|
||||||
|
@NotBlank(message = "쇼핑몰테마명")
|
||||||
private String themaNm;
|
private String themaNm;
|
||||||
|
|
||||||
/** CSS 경로*/
|
/** CSS 경로*/
|
||||||
|
@NotBlank(message = "스타일시트경로")
|
||||||
private String cssCours;
|
private String cssCours;
|
||||||
|
|
||||||
/** 설명내용 */
|
/** 설명내용 */
|
||||||
|
|||||||
@@ -2,20 +2,31 @@ package com.wb.domainserver.domain.admin.store.stplat.controller;
|
|||||||
|
|
||||||
|
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||||
|
import com.wb.domainserver.domain.admin.store.stplat.service.BOStplatService;
|
||||||
|
import com.wb.domainserver.domain.admin.store.stplat.vo.BOStplatVO;
|
||||||
import com.wb.domainserver.domain.admin.store.stplat.vo.MaStplatVO;
|
import com.wb.domainserver.domain.admin.store.stplat.vo.MaStplatVO;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||||
|
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtResponse;
|
import com.wb.domainserver.response.WnbtResponse;
|
||||||
|
import com.wb.domainserver.response.WnbtResponseBody;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
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.AuthPolicy;
|
||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
@@ -58,6 +69,15 @@ public class MaStplatController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource gconeMessageSource;
|
private GconeMessageSource gconeMessageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOStplatService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOMaComncdService bOMaComncdService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PaginationProperties paginationProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 약관 목록 조회 (검색 section)
|
* 약관 목록 조회 (검색 section)
|
||||||
* @param stplat 약관 파라미터VO
|
* @param stplat 약관 파라미터VO
|
||||||
@@ -66,12 +86,30 @@ public class MaStplatController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectStplatListInqireForm")
|
@RequestMapping(value = "/selectStplatListInqireForm")
|
||||||
public String selectStplatListInqireForm(MaStplatVO stplat, ModelMap model) {
|
public String selectStplatListInqireForm(BOStplatVO stplat, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatListFormInqire", stplat),
|
stplat.setRegusr(user.getUserInnb());
|
||||||
model,
|
stplat.setUpdusr(user.getUserInnb());
|
||||||
"resultMap"
|
|
||||||
);
|
DataMap content = new DataMap();
|
||||||
|
|
||||||
|
//쇼핑몰 목록 조회
|
||||||
|
List<DataMap> stplatSopmalList = service.selectBOStplatSopmalListInqire();
|
||||||
|
|
||||||
|
//약관 구분 코드
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("STPLAT_DV");
|
||||||
|
List<DataMap> stplatDvList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
content.put("stplatSopmalList", stplatSopmalList);
|
||||||
|
content.put("stplatDvList", stplatDvList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatListFormInqire", stplat),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/stplat/maStplatListInqireRForm";
|
return "admin/store/stplat/maStplatListInqireRForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,12 +121,43 @@ public class MaStplatController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectStplatListInqire")
|
@RequestMapping(value = "/selectStplatListInqire")
|
||||||
public String selectStplatListInqire(MaStplatVO stplat, ModelMap model) {
|
public String selectStplatListInqire(BOStplatVO stplat, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatListInqire", stplat),
|
stplat.setRegusr(user.getUserInnb());
|
||||||
model,
|
stplat.setUpdusr(user.getUserInnb());
|
||||||
"resultMap"
|
|
||||||
);
|
List<DataMap> resultList = new ArrayList<>();
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
DataMap map = new DataMap();
|
||||||
|
// pagination
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(stplat.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(stplat.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
stplat.setPaginationInfo(paginationInfo);
|
||||||
|
stplat.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
stplat.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
stplat.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
// 약관 목록 조회
|
||||||
|
resultList = service.selectBOStplatList(stplat);
|
||||||
|
|
||||||
|
|
||||||
|
// 그룹 코드 조회
|
||||||
|
map = service.selectGroupCd();
|
||||||
|
|
||||||
|
codeList.add(map);
|
||||||
|
content.put("stplat", stplat);
|
||||||
|
content.put("resultList", resultList);
|
||||||
|
content.put("codeList", codeList);
|
||||||
|
content.put("paginationInfo", stplat.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatListInqire", stplat),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/stplat/maStplatListInqireR";
|
return "admin/store/stplat/maStplatListInqireR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,10 +171,16 @@ public class MaStplatController {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
@RequestMapping(value = "/selectStplatListExcelDwld", method = RequestMethod.POST)
|
@RequestMapping(value = "/selectStplatListExcelDwld", method = RequestMethod.POST)
|
||||||
public void selectStplatListExcelDwld(MaStplatVO stplat, HttpServletResponse response, ModelMap model) {
|
public void selectStplatListExcelDwld(BOStplatVO stplat, HttpServletResponse response, ModelMap model) {
|
||||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
DataMap resultMap = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatListExcelDwld",stplat)
|
List<DataMap> resultList = new ArrayList<>();
|
||||||
);
|
// 약관 변경이력 상세 조회
|
||||||
|
resultList = service.selectBOStplatListExcelDwld(stplat);
|
||||||
|
resultMap.put("resultList", resultList);
|
||||||
|
|
||||||
|
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatListExcelDwld",stplat)
|
||||||
|
// );
|
||||||
List<Map<String, Object>> listMap = new ArrayList<>();
|
List<Map<String, Object>> listMap = new ArrayList<>();
|
||||||
listMap = (List<Map<String, Object>>) resultMap.get("resultList");
|
listMap = (List<Map<String, Object>>) resultMap.get("resultList");
|
||||||
|
|
||||||
@@ -160,12 +235,32 @@ public class MaStplatController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectStplatRegistForm")
|
@RequestMapping(value = "/selectStplatRegistForm")
|
||||||
public String selectStplatRegistForm(MaStplatVO stplat, ModelMap model) {
|
public String selectStplatRegistForm(BOStplatVO stplat, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatRegistForm", stplat),
|
DataMap srchData = new DataMap();
|
||||||
model,
|
srchData.put("srchSopmalCd", stplat.getSrchSopmalCd());
|
||||||
"resultMap"
|
srchData.put("srchStplatDvCd", stplat.getSrchStplatDvCd());
|
||||||
);
|
srchData.put("srchStplatNm", stplat.getSrchStplatNm());
|
||||||
|
srchData.put("pageUnit", stplat.getPageUnit());
|
||||||
|
srchData.put("pageIndex", stplat.getPageIndex());
|
||||||
|
List<DataMap> srchList = new ArrayList<>();
|
||||||
|
srchList.add(srchData);
|
||||||
|
|
||||||
|
//약관 구분 코드
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("STPLAT_DV");
|
||||||
|
List<DataMap> stplatDvList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
content.put("stplat", stplat);
|
||||||
|
content.put("stplatDvList", stplatDvList);
|
||||||
|
content.put("srchData", srchData);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatRegistForm", stplat),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/stplat/maStplatC";
|
return "admin/store/stplat/maStplatC";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,15 +272,28 @@ public class MaStplatController {
|
|||||||
* @return ResponseEntity<?>
|
* @return ResponseEntity<?>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/insertStplatRegist", method = RequestMethod.POST)
|
@RequestMapping(value = "/insertStplatRegist", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> insertStplatRegist(@Validated MaStplatVO stplat, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> insertStplatRegist(@Validated BOStplatVO stplat, BindingResult bindingResult) {
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/insertBOStplatRegist", stplat),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
stplat.setRegusr(user.getUserInnb());
|
||||||
);
|
stplat.setUpdusr(user.getUserInnb());
|
||||||
|
// 약관 등록
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.insertBOStplat(stplat);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/insertBOStplatRegist", stplat),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -198,12 +306,47 @@ public class MaStplatController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectStplatUpdtForm")
|
@RequestMapping(value = "/selectStplatUpdtForm")
|
||||||
public String selectStplatUpdtForm(MaStplatVO stplat, ModelMap model) {
|
public String selectStplatUpdtForm(BOStplatVO stplat, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatUpdtForm", stplat),
|
DataMap srchData = new DataMap();
|
||||||
model,
|
srchData.put("srchSopmalCd", stplat.getSrchSopmalCd());
|
||||||
"resultMap"
|
srchData.put("srchStplatDvCd", stplat.getSrchStplatDvCd());
|
||||||
);
|
srchData.put("srchStplatNm", stplat.getSrchStplatNm());
|
||||||
|
srchData.put("pageUnit", stplat.getPageUnit());
|
||||||
|
srchData.put("pageIndex", stplat.getPageIndex());
|
||||||
|
srchData.put("pageDv", stplat.getPageDv());
|
||||||
|
List<DataMap> srchList = new ArrayList<>();
|
||||||
|
srchList.add(srchData);
|
||||||
|
|
||||||
|
// 약관 상세 조회
|
||||||
|
BOStplatVO vo = new BOStplatVO();
|
||||||
|
vo = service.selectBOStplatDtl(stplat);
|
||||||
|
vo.setPageDv(stplat.getPageDv());
|
||||||
|
|
||||||
|
|
||||||
|
// 약관 변경이력 조회
|
||||||
|
List<DataMap> resultList = service.selectBOStplatHistList(stplat);
|
||||||
|
// 그룹코드 조회
|
||||||
|
DataMap map = service.selectGroupCd();
|
||||||
|
List<DataMap> codeList = new ArrayList<>();
|
||||||
|
codeList.add(map);
|
||||||
|
|
||||||
|
//약관 구분 코드
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("STPLAT_DV");
|
||||||
|
List<DataMap> stplatDvList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||||
|
|
||||||
|
content.put("stplat", vo);
|
||||||
|
content.put("stplatDvList", stplatDvList);
|
||||||
|
content.put("srchData", srchData);
|
||||||
|
content.put("resultList", resultList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatUpdtForm", stplat),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/stplat/maStplatU";
|
return "admin/store/stplat/maStplatU";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,15 +358,27 @@ public class MaStplatController {
|
|||||||
* @return ResponseEntity<?>
|
* @return ResponseEntity<?>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/updateStplatUpd", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateStplatUpd", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<WnbtResponse> updateStplatUpd(@Validated MaStplatVO stplat, BindingResult bindingResult) {
|
public ResponseEntity<WnbtResponse> updateStplatUpd(@Validated BOStplatVO stplat, BindingResult bindingResult) {
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/updateBOStplatUpd", stplat),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
stplat.setUpdusr(user.getUserInnb());
|
||||||
);
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.updateBOStplat(stplat);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/updateBOStplatUpd", stplat),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -233,15 +388,26 @@ public class MaStplatController {
|
|||||||
* @return ResponseEntity<?>
|
* @return ResponseEntity<?>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectStplatSopmalUse", method = RequestMethod.POST)
|
@RequestMapping(value = "/selectStplatSopmalUse", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> selectStplatSopmalUse(@Validated MaStplatVO stplat, BindingResult bindingResult) {
|
public ResponseEntity<?> selectStplatSopmalUse(@Validated BOStplatVO stplat, BindingResult bindingResult) {
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatSopmalUse", stplat),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
stplat.setUpdusr(user.getUserInnb());
|
||||||
);
|
|
||||||
|
DataMap content = service.selectBOStplatSopmalUse(stplat);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatSopmalUse", stplat),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -251,15 +417,27 @@ public class MaStplatController {
|
|||||||
* @return ResponseEntity<?>
|
* @return ResponseEntity<?>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/deleteStplatDel", method = RequestMethod.POST)
|
@RequestMapping(value = "/deleteStplatDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> deleteStplatDel(@Validated MaStplatVO stplat, BindingResult bindingResult) {
|
public ResponseEntity<?> deleteStplatDel(@Validated BOStplatVO stplat, BindingResult bindingResult) {
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/updateBOStplatUseAtUpd", stplat),
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
ReplyFromResrc::getReply
|
stplat.setUpdusr(user.getUserInnb());
|
||||||
);
|
|
||||||
|
DataMap content = new DataMap();
|
||||||
|
content = service.updateBOStplatUseAtUpd(stplat);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/updateBOStplatUseAtUpd", stplat),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -271,12 +449,18 @@ public class MaStplatController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping("/selectStplatChangePopup")
|
@RequestMapping("/selectStplatChangePopup")
|
||||||
public String selectStplatChangePopup(MaStplatVO stplat, ModelMap model) {
|
public String selectStplatChangePopup(BOStplatVO stplat, ModelMap model) {
|
||||||
responseHandler.handleResponse(
|
DataMap content = new DataMap();
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatHistDtlInqire", stplat),
|
// 약관 변경이력 상세 조회
|
||||||
model,
|
stplat = service.selectBOStplatHistDtl(stplat.getStplatInnb(), stplat.getChngSnb());
|
||||||
"resultMap"
|
content.put("stplat", stplat);
|
||||||
);
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBOStplatHistDtlInqire", stplat),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
return "admin/store/stplat/maStplatChangePopupR";
|
return "admin/store/stplat/maStplatChangePopupR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,14 +471,25 @@ public class MaStplatController {
|
|||||||
* @return ResponseEntity<?>
|
* @return ResponseEntity<?>
|
||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectStplatInqire", method = RequestMethod.POST)
|
@RequestMapping(value = "/selectStplatInqire", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<?> selectStplatInqire(MaStplatVO stplat, BindingResult bindingResult) {
|
public ResponseEntity<?> selectStplatInqire(BOStplatVO stplat, BindingResult bindingResult) {
|
||||||
if(bindingResult.hasErrors()) {
|
if(bindingResult.hasErrors()) {
|
||||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||||
}
|
}
|
||||||
return responseHandler.handleResponse(
|
|
||||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBoStplatInqire", stplat),
|
DataMap content = new DataMap();
|
||||||
ReplyFromResrc::getReply
|
// 약관 변경이력 상세 조회
|
||||||
);
|
stplat = service.selectStplatInqire(stplat.getStplatInnb(), stplat.getChngSnb());
|
||||||
|
content.put("stplat", stplat);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/store/stplat/selectBoStplatInqire", stplat),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.wb.domainserver.domain.admin.store.stplat.vo;
|
|||||||
|
|
||||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@@ -16,21 +18,31 @@ public class BOStplatVO extends AbstractVO{
|
|||||||
/** 변경순번 */
|
/** 변경순번 */
|
||||||
private Integer chngSnb;
|
private Integer chngSnb;
|
||||||
/** 약관명 */
|
/** 약관명 */
|
||||||
|
@NotBlank(message = "약관 명")
|
||||||
|
@Length(min = 0, max = 100, message = "약관 명")
|
||||||
private String stplatNm;
|
private String stplatNm;
|
||||||
|
|
||||||
/** 약관구분코드 */
|
/** 약관구분코드 */
|
||||||
|
@NotBlank(message = "약관구분코드")
|
||||||
private String stplatDvCd;
|
private String stplatDvCd;
|
||||||
|
|
||||||
/** 약관내용 */
|
/** 약관내용 */
|
||||||
|
@NotBlank(message = "약관내용")
|
||||||
private String stplatCn;
|
private String stplatCn;
|
||||||
|
|
||||||
/** 중요약관내용 */
|
/** 중요약관내용 */
|
||||||
private String imprtncStplatCn;
|
private String imprtncStplatCn;
|
||||||
|
|
||||||
|
/** 변경사유내용 */
|
||||||
|
@NotBlank(message = "변경사유내용")
|
||||||
|
private String chngResnCn;
|
||||||
|
|
||||||
/** 쇼핑몰 이름 */
|
/** 쇼핑몰 이름 */
|
||||||
private String sopmalNm;
|
private String sopmalNm;
|
||||||
/** 등록자(수정자) 이름 */
|
/** 등록자(수정자) 이름 */
|
||||||
private String mngrNm;
|
private String mngrNm;
|
||||||
/** 수정일(String) */
|
/** 수정일(String) */
|
||||||
private String updtDe;
|
private String updtDe;
|
||||||
/** 변경사유내용 */
|
|
||||||
private String chngResnCn;
|
|
||||||
/** 필수 여부 */
|
/** 필수 여부 */
|
||||||
private String essntlAt;
|
private String essntlAt;
|
||||||
/** 내용작성여부 */
|
/** 내용작성여부 */
|
||||||
@@ -58,7 +70,13 @@ public class BOStplatVO extends AbstractVO{
|
|||||||
|
|
||||||
/** 그룹코드이름 */
|
/** 그룹코드이름 */
|
||||||
private String stplatDvNm;
|
private String stplatDvNm;
|
||||||
|
|
||||||
|
private String[] stplatNmArr;
|
||||||
|
private String[] stplatDvNmArr;
|
||||||
|
private String[] sopmalNmArr;
|
||||||
|
private String[] registDtArr;
|
||||||
|
private String[] updtDeArr;
|
||||||
|
private String[] rnumArr;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user