fo bo 머지작업(mngr)
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
package com.wb.domainserver.domain.mngr.setup.dlvygrp.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.service.BODlvygrpService;
|
||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.vo.BODlvygrpVO;
|
||||
import com.wb.domainserver.domain.mngr.setup.dlvygrp.vo.SetupDlvygrpVO;
|
||||
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.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
@@ -14,6 +21,7 @@ import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -23,6 +31,10 @@ import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Dlvygrp Controller Class (front)
|
||||
*
|
||||
@@ -58,24 +70,56 @@ public class SetupDlvygrpController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BODlvygrpService service;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 배송그룹 목록 조회
|
||||
* @param SetupDlvygrpVO 배송그룹VO
|
||||
* @param ModelMap 모델객체
|
||||
* @param dlvyGroup 배송그룹VO
|
||||
* @param model 모델객체
|
||||
* @return DlvyGroupListR.jsp 배송그룹목록
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/dlvyGroupListR")
|
||||
public String selectDlvyGroupList(SetupDlvygrpVO dlvyGroup,
|
||||
public String selectDlvyGroupList(BODlvygrpVO dlvyGroup,
|
||||
ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupList", dlvyGroup),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
dlvyGroup.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(dlvyGroup.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(dlvyGroup.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
dlvyGroup.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
dlvyGroup.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
dlvyGroup.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
dlvyGroup.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//배송그룹 목록조회
|
||||
List<BODlvygrpVO> dlvyGroupList = service.selectBODlvyGroupList(dlvyGroup);
|
||||
log.debug("selectBODlvyGroupList's dlvyGroupList : {}", dlvyGroupList);
|
||||
|
||||
//배송그룹 목록조회 결과 설정
|
||||
content.put("BODlvygrpVO", dlvyGroup);
|
||||
content.put("paginationInfo", dlvyGroup.getPaginationInfo());
|
||||
content.put("dlvyGroupList", dlvyGroupList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupList", dlvyGroup),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/setup/dlvygrp/DlvyGroupListR";
|
||||
}
|
||||
@@ -92,13 +136,13 @@ public class SetupDlvygrpController {
|
||||
|
||||
/**
|
||||
* 배송그룹 등록
|
||||
* @param SetupDlvygrpVO 배송그룹 등록 파라미터 VO
|
||||
* @param dlvyGroup 배송그룹 등록 파라미터 VO
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return ResponseEntity<WnbtResponse> 배송그룹 등록 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@PostMapping("/insertDlvyGroup")
|
||||
public ResponseEntity<WnbtResponse> insertDlvyGroup(@Validated SetupDlvygrpVO dlvyGroup,
|
||||
@PostMapping(value="/insertDlvyGroup", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertDlvyGroup(@Validated BODlvygrpVO dlvyGroup,
|
||||
BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
@@ -162,119 +206,156 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setReturnDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getReturnDlvyAmt()));
|
||||
dlvyGroup.setExchngDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getExchngDlvyAmt()));
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
dlvyGroup.setRegusr(user.getUserInnb());
|
||||
dlvyGroup.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
dlvyGroup.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//배송그릅 등록 처리
|
||||
Map<String, Object> message = service.insertBODlvyGroup(dlvyGroup);
|
||||
|
||||
//BO 발송그룹 등록 API 호출
|
||||
//배송그룹 등록처리 결과 메시지(JSON) 처리
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/insertBODlvyGroup", dlvyGroup),
|
||||
ReplyFromResrc::getReply
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/insertBODlvyGroup", dlvyGroup),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
/*배송그룹 정보 조회*/
|
||||
private Map<String, Object> selectBODlvyGroupDtlForm(BODlvygrpVO dlvyGroup){
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
dlvyGroup.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
dlvyGroup.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
dlvyGroup = service.selectBODlvyGroupDtlForm(dlvyGroup);
|
||||
content.put("dlvyGroup", dlvyGroup);
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 배송그룹 정보 상세조회(공통)
|
||||
* @param SetupDlvygrpVO 배송그룹 파라미터 VO
|
||||
* @param dlvyGroup 배송그룹 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return DlvyGroupDtlU.jsp 배송그룹 수정화면
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/dlvyGroupDtlU")
|
||||
public String selectDlvyGroupDtlForm(SetupDlvygrpVO dlvyGroup,
|
||||
public String selectDlvyGroupDtlForm(BODlvygrpVO dlvyGroup,
|
||||
ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
|
||||
//BO 배송그룹 등록 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
Map<String, Object> content = selectBODlvyGroupDtlForm(dlvyGroup);
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/setup/dlvygrp/DlvyGroupDtlU";
|
||||
}
|
||||
|
||||
/**
|
||||
* 조건부 무료배송 jsp 호출
|
||||
* @param SetupDlvygrpVO 배송그룹 파라미터 VO
|
||||
* @param dlvyGroup 배송그룹 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return ConditionFreeDlvy.jsp 조건부무료배송
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@PostMapping(value="/conditionFreeDlvy")
|
||||
public String findConditionFreeDlvy(SetupDlvygrpVO dlvyGroup, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String findConditionFreeDlvy(BODlvygrpVO dlvyGroup, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
//해당 배송그룹 구분이 아니면 jsp 호출
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
|
||||
|
||||
if("01".equals(dlvyGroup.getDlvyGroupDvCd()) && dlvyGroup.getDlvyGroupInnb() != null) {
|
||||
//BO 배송그룹 정보 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
Map<String, Object> content = selectBODlvyGroupDtlForm(dlvyGroup);
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
}
|
||||
return "mngr/setup/dlvygrp/ConditionFreeDlvy";
|
||||
}
|
||||
|
||||
/**
|
||||
* 무료배송 jsp 호출
|
||||
* @param SetupDlvygrpVO 배송그룹 파라미터 VO
|
||||
* @param dlvyGroup 배송그룹 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return FreeDlvy.jsp 무료배송
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@PostMapping(value="/freeDlvy")
|
||||
public String findFreeDlvy(SetupDlvygrpVO dlvyGroup, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String findFreeDlvy(BODlvygrpVO dlvyGroup, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
//해당 배송그룹 구분이 아니면 jsp 호출
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
|
||||
if("02".equals(dlvyGroup.getDlvyGroupDvCd()) && dlvyGroup.getDlvyGroupInnb() != null) {
|
||||
//BO 배송그룹 정보 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
Map<String, Object> content = selectBODlvyGroupDtlForm(dlvyGroup);
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
}
|
||||
return "mngr/setup/dlvygrp/FreeDlvy";
|
||||
}
|
||||
|
||||
/**
|
||||
* 유료배송 jsp 호출
|
||||
* @param SetupDlvygrpVO 배송그룹 파라미터 VO
|
||||
* @param dlvyGroup 배송그룹 파라미터 VO
|
||||
* @param model 모델객체
|
||||
* @return PayDlvy.jsp 유료배송
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@PostMapping(value="/payDlvy")
|
||||
public String findPayDlvy(SetupDlvygrpVO dlvyGroup, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String findPayDlvy(BODlvygrpVO dlvyGroup, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
//해당 배송그룹 구분이 아니면 jsp 호출
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
|
||||
if("03".equals(dlvyGroup.getDlvyGroupDvCd()) && dlvyGroup.getDlvyGroupInnb() != null) {
|
||||
//BO 배송그룹 정보 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
Map<String, Object> content = selectBODlvyGroupDtlForm(dlvyGroup);
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/selectBODlvyGroupDtlForm", dlvyGroup),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
}
|
||||
return "mngr/setup/dlvygrp/PayDlvy";
|
||||
}
|
||||
|
||||
/**
|
||||
* 배송그룹 수정
|
||||
* @param SetupDlvygrpVO 배송그룹 파라미터 VO
|
||||
* @param dlvyGroup 배송그룹 파라미터 VO
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return ResponseEntity<WnbtResponse> 배송그룹 등록 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@PostMapping("/updateDlvyGroupDtl")
|
||||
public ResponseEntity<WnbtResponse> updateDlvyGroupDtl(@Validated SetupDlvygrpVO dlvyGroup,
|
||||
@PostMapping(value="/updateDlvyGroupDtl", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateDlvyGroupDtl(@Validated BODlvygrpVO dlvyGroup,
|
||||
BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
@@ -340,31 +421,56 @@ public class SetupDlvygrpController {
|
||||
dlvyGroup.setReturnDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getReturnDlvyAmt()));
|
||||
dlvyGroup.setExchngDlvyAmt(StringUtil.removeCommaChar(dlvyGroup.getExchngDlvyAmt()));
|
||||
|
||||
//BO 배송그룹 수정 API 호출
|
||||
//배송그룹 등록처리 결과 메시지(JSON) 처리
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/updateBODlvyGroupDtl", dlvyGroup),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
dlvyGroup.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
dlvyGroup.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> message = service.updateBODlvyGroupDtl(dlvyGroup);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/updateBODlvyGroupDtl", dlvyGroup),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 배송그룹 삭제
|
||||
* @param SetupDlvygrpVO 배송그룹 파라미터 VO
|
||||
* @param dlvyGroup 배송그룹 파라미터 VO
|
||||
* @return ResponseEntity<WnbtResponse> 배송그룹 등록 결과
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@PostMapping("/deleteDlvyGroup")
|
||||
public ResponseEntity<WnbtResponse> deleteDlvyGroup(SetupDlvygrpVO dlvyGroup, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@PostMapping(value = "/deleteDlvyGroup", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteDlvyGroup(BODlvygrpVO dlvyGroup, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
dlvyGroup.setSopmalCd(authSopmalCd);
|
||||
|
||||
//BO 배송그룹 삭제 API 호출
|
||||
//배송그룹 등록처리 결과 메시지(JSON) 처리
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/deleteBODlvyGroup", dlvyGroup),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
dlvyGroup.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
dlvyGroup.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, String> message = service.deleteBODlvyGroup(dlvyGroup);
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/dlvygrp/deleteBODlvyGroup", dlvyGroup),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,30 @@
|
||||
package com.wb.domainserver.domain.mngr.setup.mbr.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.admin.store.mbrgrad.service.BOMaMbrgradService;
|
||||
import com.wb.domainserver.domain.admin.store.mbrgrad.vo.BOMaMbrgradVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.gradbnef.service.BOGradbnefService;
|
||||
import com.wb.domainserver.domain.gcone.setup.gradbnef.vo.BOGradbnefVO;
|
||||
import com.wb.domainserver.domain.mngr.setup.mbr.vo.SetupMbrVO;
|
||||
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.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -22,7 +33,9 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -58,71 +71,140 @@ public class SetupMbrController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOGradbnefService service;
|
||||
@Autowired
|
||||
private BOMaMbrgradService maMbrgradService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 등급 별 혜택 목록 검색 폼 이동
|
||||
* @return GradBnefSrch.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMbrGradSrchForm")
|
||||
public String selectMbrGradSrch(ModelMap model,SetupMbrVO paramVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMbrGradSrch(ModelMap model,BOGradbnefVO paramVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
paramVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
//BO 등급 별 혜택 목록 검색 폼 조회 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/gradbnef/selectBOMbrGradFormInqire", paramVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
if(StringUtil.isEmpty(paramVO.getSopmalCd())){
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
paramVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
}
|
||||
|
||||
//페이징 정보 set
|
||||
Map<String, Object> reulstMap = new HashMap<>();
|
||||
reulstMap.put("paramVO", paramVO);
|
||||
|
||||
model.addAttribute("resultMap", reulstMap);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/gradbnef/selectBOMbrGradFormInqire", paramVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/setup/mbr/GradBnefSrchR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 등급 별 혜택 목록 조회
|
||||
* @param SetupMbrVO
|
||||
* @param paramVO
|
||||
* @return GradBnefListR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMbrGradListInqire")
|
||||
public String selectMbrGradListInqire(ModelMap model,SetupMbrVO paramVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
public String selectMbrGradListInqire(ModelMap model,BOGradbnefVO paramVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
paramVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/gradbnef/selectBOMbrGradListInqire", paramVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
paramVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//페이징 정보 set
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(paramVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(paramVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
paramVO.setPaginationInfo(paginationInfo);
|
||||
paramVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
paramVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
paramVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//회원 등급 목록 조회
|
||||
List<DataMap> resultList = service.selectBOMbrGradListInqire(paramVO);
|
||||
|
||||
//회원 등급 산정 기간 조회(사용자)
|
||||
Map<String, Object> gradGroup = new HashMap<>();
|
||||
if("sopmal".equals(paramVO.getServerDv())){
|
||||
BOMaMbrgradVO maMbrgradVO = new BOMaMbrgradVO();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
maMbrgradVO.setSopmalCd(paramVO.getSopmalCd());
|
||||
}
|
||||
maMbrgradVO.setServerDv(paramVO.getServerDv());
|
||||
gradGroup = maMbrgradService.selectBOMbrGradUpdtForm(maMbrgradVO);
|
||||
}
|
||||
|
||||
//회원 등급 목록 조회 결과 및 페이징정보 넣기
|
||||
content.put("paramVO", paramVO);
|
||||
content.put("resultList", resultList);
|
||||
content.put("gradGroup", gradGroup);
|
||||
content.put("paginationInfo", paramVO.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/gradbnef/selectBOMbrGradListInqire", paramVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/setup/mbr/GradBnefListR";
|
||||
}
|
||||
/**
|
||||
* 등급 별 혜택 상세 페이지 이동
|
||||
* @param SetupMbrVO
|
||||
* @param paramVO
|
||||
* @return GradBnefRegistU.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectGradBnefRegistInqire")
|
||||
public String selectGradBnefRegistInqire(ModelMap model, SetupMbrVO paramVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectGradBnefRegistInqire(ModelMap model, BOGradbnefVO paramVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
paramVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/gradbnef/selectBOGradBnefRegistInqire", paramVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
paramVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
Map<String, Object> gradDtl = service.selectBOGradBnefRegistInqire(paramVO);
|
||||
|
||||
//회원 등급 상세, 권한 그룹, vo
|
||||
content.put("gradDtl", gradDtl);
|
||||
content.put("vo", paramVO);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/gradbnef/selectBOGradBnefRegistInqire", paramVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
model.addAttribute("paramVO",paramVO);
|
||||
return "mngr/setup/mbr/GradBnefRegistU";
|
||||
}
|
||||
/**
|
||||
* 등급 별 혜택 수정
|
||||
* @param SetupMbrVO
|
||||
* @param paramVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateGradBnefUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateGradBnefUpdt(@Validated SetupMbrVO paramVO
|
||||
@RequestMapping(value="/updateGradBnefUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateGradBnefUpdt(@Validated BOGradbnefVO paramVO
|
||||
,BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
paramVO.setSopmalCd(authSopmalCd);
|
||||
@@ -171,10 +253,26 @@ public class SetupMbrController {
|
||||
if("Y".equals(paramVO.getValidPdChk())) {
|
||||
paramVO.setMlgValidMtCnt(null);
|
||||
}
|
||||
//BO API 호출 => 등급 별 혜택 수정
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/gradbnef/updateBOGradBnefUpdt", paramVO),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
paramVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
//등록자 수정자 set
|
||||
paramVO.setRegusr(user.getUserInnb());
|
||||
paramVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
//회원 등급 혜택 설정 저장
|
||||
service.updateBOGradBnefUpdt(paramVO);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(""))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/gradbnef/updateBOGradBnefUpdt", paramVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
package com.wb.domainserver.domain.mngr.setup.mngr.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
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.admin.user.mngr.service.BOJobUserService;
|
||||
import com.wb.domainserver.domain.admin.user.mngr.vo.BOJobUserVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.common.vo.BOCommonVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.mngr.sevice.BOMngrInfoService;
|
||||
import com.wb.domainserver.domain.gcone.setup.mngr.vo.BOMngrInfoVO;
|
||||
import com.wb.domainserver.domain.mngr.setup.mngr.vo.SetupMngrInfoVO;
|
||||
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.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.*;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -17,6 +31,9 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -55,7 +72,22 @@ public class SetupMngrInfoController {
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
/**
|
||||
@Autowired
|
||||
private BOMngrInfoService service;
|
||||
|
||||
@Autowired
|
||||
private BOJobUserService jobUserService;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
/**
|
||||
* 관리자 정보 조회
|
||||
* @param vo
|
||||
* @param model 모델객체
|
||||
@@ -63,14 +95,41 @@ public class SetupMngrInfoController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMngrInfoInqireForm")
|
||||
public String selectMngrInfoInqireForm(SetupMngrInfoVO vo,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
public String selectMngrInfoInqireForm(BOJobUserVO vo,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
// vo.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||
|
||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/selectBOMngrInfoUpdtForm", vo)
|
||||
);
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
// 작성자 정보 추출
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setMngrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
// if("01".equals(user.getSysDvCd())){
|
||||
// vo.setSopmalCd(user.getSopmalCd());
|
||||
// }
|
||||
|
||||
DataMap result = new DataMap();
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
List<DataMap> detail = new ArrayList<>();
|
||||
detail = jobUserService.selectBOJobUserDetail(vo);
|
||||
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("EMAIL_ADRES");
|
||||
List<?> emailCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
bOMaComncdVO.setGroupCd("MNGR_DV");
|
||||
List<?> mngrDvCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
List<DataMap> managerCodeList = new ArrayList<>();
|
||||
managerCodeList = jobUserService.managerCode();
|
||||
|
||||
result.put("detail", detail);
|
||||
result.put("mngrDvCdList", mngrDvCdList);
|
||||
result.put("emailCdList", emailCdList);
|
||||
|
||||
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/selectBOMngrInfoUpdtForm", vo)
|
||||
// );
|
||||
model.addAttribute("resultMap", result);
|
||||
return "mngr/setup/mngr/MngrInfoDtlU";
|
||||
}
|
||||
|
||||
@@ -79,8 +138,8 @@ public class SetupMngrInfoController {
|
||||
* @param vo
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateMngrInfoUpdt")
|
||||
public ResponseEntity<?> updateMngrInfoUpdt(@Validated SetupMngrInfoVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@RequestMapping(value="/updateMngrInfoUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateMngrInfoUpdt(@Validated BOMngrInfoVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
// vo.setSopmalCd(session.getAttribute("authSopmalCd").toString());
|
||||
|
||||
@@ -116,10 +175,47 @@ public class SetupMngrInfoController {
|
||||
}
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/updateBOMngrInfoUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
// if("01".equals(user.getSysDvCd())){
|
||||
// vo.setSopmalCd(user.getSopmalCd());
|
||||
// }
|
||||
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
DataMap resultInfo = new DataMap();
|
||||
|
||||
/*비밀번호 인증 수정*/
|
||||
if("Y".equals(vo.getPwChngAt())){
|
||||
/* 암호화 필수값
|
||||
pass(사용자입력 비밀번호)
|
||||
encptKeyDvCd(암호화키구분코드) => 01(회원),02(관리자), 03(매장)
|
||||
idntfcInnb(식별고유번호) => 회원/관리자/매장관리자 고유번호*/
|
||||
BOCommonVO commVO = new BOCommonVO();
|
||||
commVO.setPass(vo.getChngPw());
|
||||
commVO.setEncptKeyDvCd("02");
|
||||
commVO.setIdntfcInnb(String.valueOf(vo.getMngrInnb()));
|
||||
String encptyPw = boCommonService.generateKey(commVO);
|
||||
vo.setPassword(encptyPw);
|
||||
resultInfo.put("chngePwAt","Y");
|
||||
}else{
|
||||
resultInfo.put("chngePwAt","N");
|
||||
}
|
||||
|
||||
/*관리자 정보 수정*/
|
||||
int result = service.updateBOMngrInfoUpdt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(resultInfo))
|
||||
.build()
|
||||
);
|
||||
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/updateBOMngrInfoUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
package com.wb.domainserver.domain.mngr.setup.nbkk.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.gcone.setup.nbkk.service.BONbkkService;
|
||||
import com.wb.domainserver.domain.gcone.setup.nbkk.vo.BOSetupNbkkVO;
|
||||
import com.wb.domainserver.domain.mngr.setup.nbkk.vo.SetupNbkkVO;
|
||||
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.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
@@ -13,6 +18,7 @@ import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -22,6 +28,9 @@ import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 무통장 설정 Controller
|
||||
*
|
||||
@@ -55,23 +64,35 @@ public class SetupNbkkController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BONbkkService service;
|
||||
|
||||
/**
|
||||
* 무통장 설정 페이지 이동
|
||||
*
|
||||
* @param SetupNbkkVO
|
||||
* @param boNbkkVO
|
||||
* @return NbkkSetupListR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectNbkkSetupList")
|
||||
public String selectNbkkSetupList(ModelMap model, SetupNbkkVO setupNbkkVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectNbkkSetupList(ModelMap model, BOSetupNbkkVO boNbkkVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
setupNbkkVO.setSopmalCd(authSopmalCd);
|
||||
boNbkkVO.setSopmalCd(authSopmalCd);
|
||||
/*무통장 설정 조회 */
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/nbkk/selectBONbkkSetupList", setupNbkkVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boNbkkVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
Map<String, Object> nbkkList = new HashMap<>();
|
||||
nbkkList.put("nbkkList",service.selectBOSopmalSetupList(boNbkkVO));
|
||||
|
||||
|
||||
model.addAttribute("resultMap", nbkkList);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/nbkk/selectBONbkkSetupList", setupNbkkVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/setup/nbkk/NbkkSetupListR";
|
||||
}
|
||||
|
||||
@@ -79,23 +100,38 @@ public class SetupNbkkController {
|
||||
/**
|
||||
* 무통장 설정 수정
|
||||
*
|
||||
* @param SetupNbkkVO
|
||||
* @param boNbkkVO
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@PostMapping(value = "/updateNbkkSetup")
|
||||
public ResponseEntity<WnbtResponse> updateNbkkSetup(@Validated SetupNbkkVO setupNbkkVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@PostMapping(value = "/updateNbkkSetup", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateNbkkSetup(@Validated BOSetupNbkkVO boNbkkVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
setupNbkkVO.setSopmalCd(authSopmalCd);
|
||||
boNbkkVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
//BO 배송지 수정 결과를 Map으로 변환하여 설정
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/nbkk/updateBOPNbkkSetup", setupNbkkVO),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
//등록자 수정자 set
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boNbkkVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
boNbkkVO.setRegusr(user.getUserInnb());
|
||||
boNbkkVO.setUpdusr(user.getUserInnb());
|
||||
//무통장 설정 저장
|
||||
service.updateBOPNbkkSetup(boNbkkVO);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(""))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/nbkk/updateBOPNbkkSetup", setupNbkkVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
package com.wb.domainserver.domain.mngr.setup.ordr.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.mngr.setup.ordr.vo.SetupOrdrVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.service.BOOrdrMngrService;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.vo.BOSetupOrdrVO;
|
||||
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.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -24,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -56,32 +60,45 @@ public class SetupOrdrController {
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOOrdrMngrService service;
|
||||
|
||||
|
||||
/**
|
||||
* 주문 설정 페이지 이동
|
||||
* @param setupOrdrVO
|
||||
* @param boOrdrVO
|
||||
* @return NbkkSetupListR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectOrdrSetupList")
|
||||
public String selectOrdrSetupList(ModelMap model,SetupOrdrVO setupOrdrVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectOrdrSetupList(ModelMap model, BOSetupOrdrVO boOrdrVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
setupOrdrVO.setSopmalCd(authSopmalCd);
|
||||
boOrdrVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/ordrmngr/selectBOOrdrSetupList", setupOrdrVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boOrdrVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = service.selectBOOrdrSetupList(boOrdrVO);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/setup/ordrmngr/selectBOOrdrSetupList", setupOrdrVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/setup/ordr/OrdrListR";
|
||||
}
|
||||
/**
|
||||
* 주문 저장, 수정
|
||||
* @param setupOrdrVO
|
||||
* @param vo
|
||||
* @return NbkkSetupListR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateOrdrSetup" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateOrdrSetup(@Validated SetupOrdrVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@RequestMapping(value="/updateOrdrSetup" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateOrdrSetup(@Validated BOSetupOrdrVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
@@ -136,10 +153,26 @@ public class SetupOrdrController {
|
||||
if("N".equals(vo.getMlgMxmmPymntAmtAt())) {
|
||||
vo.setMlgMxmmPymntAmt(null);
|
||||
}
|
||||
//BO API 호출 => 주문 저장
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/ordrmngr/updateBOOrdrSetup", vo),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
//등록자 수정자 set
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
//주문 설정 저장
|
||||
result = service.updateBOOrdrSetup(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/ordrmngr/updateBOOrdrSetup", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
package com.wb.domainserver.domain.mngr.setup.popup.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.mngr.setup.popup.vo.SetupPopupVO;
|
||||
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import com.wb.domainserver.common.prop.PaginationProperties;
|
||||
import com.wb.domainserver.domain.gcone.setup.popup.service.BOPopupService;
|
||||
import com.wb.domainserver.domain.gcone.setup.popup.vo.BOPopupVO;
|
||||
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.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
import com.wb.domainserver.util.communicate.RESRC;
|
||||
import com.wb.domainserver.util.communicate.ReplyFromResrc;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.file.FileMngUtil;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.file.service.FileStorageService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -28,6 +32,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 팝업 관리 Controller
|
||||
@@ -53,18 +58,19 @@ public class SetupPopupController {
|
||||
private SendToResrc sendToResrc;
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
@Autowired
|
||||
private FileMngUtil fileMngUtil;
|
||||
@Value("${mngrfo.common.fileupload.uploaddirs.goods}")
|
||||
private String uploadFilePath;
|
||||
@Value("${mngrfo.common.fileupload.extensions.images}")
|
||||
private String whiteListFileUploadExtensions;
|
||||
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private BOPopupService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
|
||||
/**
|
||||
* 팝업 목록 조회
|
||||
* @param vo
|
||||
@@ -73,17 +79,41 @@ public class SetupPopupController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectPopupList")
|
||||
public String selectCmmnCodeListInqire(SetupPopupVO vo,
|
||||
public String selectCmmnCodeListInqire(BOPopupVO vo,
|
||||
ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/selectBOPopupList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
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> list = service.selectBOPopupList(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("BOPopupVO", vo);
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/selectBOPopupList", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/setup/popup/PopupListR";
|
||||
}
|
||||
@@ -96,16 +126,42 @@ public class SetupPopupController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectPopupRegistForm")
|
||||
public String selectPopupRegistForm(SetupPopupVO vo,
|
||||
public String selectPopupRegistForm(BOPopupVO vo,
|
||||
ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/selectBOPopupList", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
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> list = service.selectBOPopupList(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("BOPopupVO", vo);
|
||||
content.put("list", list);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/selectBOPopupList", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/setup/popup/PopupRegistC";
|
||||
}
|
||||
|
||||
@@ -117,15 +173,28 @@ public class SetupPopupController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectPopupUpdtForm")
|
||||
public String selectPopupDtlForm(SetupPopupVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectPopupDtlForm(BOPopupVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/selectBOPopupDtl", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
// 상세조회
|
||||
DataMap list = new DataMap();
|
||||
list = service.selectBOPopupDtl(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("BOPopupVO", vo);
|
||||
content.put("list", list);
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/selectBOPopupDtl", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/setup/popup/PopupDtlU";
|
||||
}
|
||||
@@ -137,8 +206,8 @@ public class SetupPopupController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertPopup" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> insertPopup(@Validated SetupPopupVO vo, BindingResult bindingResult , HttpServletRequest request,
|
||||
@RequestMapping(value="/insertPopup" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertPopup(@Validated BOPopupVO vo, BindingResult bindingResult , HttpServletRequest request,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
|
||||
@@ -177,19 +246,34 @@ public class SetupPopupController {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다."+ wre.getMessage());
|
||||
log.error(wre.getMessage());
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다.");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다."+e);
|
||||
log.error(e.getMessage());
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다.");
|
||||
}
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/insertBOPopup", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//팝업 등록 로직
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.insertBOPopup(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/insertBOPopup", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -199,13 +283,11 @@ public class SetupPopupController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updatePopupDtl" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updatePopupDtl(@Validated SetupPopupVO vo, BindingResult bindingResult , HttpServletRequest request,
|
||||
@RequestMapping(value="/updatePopupDtl" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updatePopupDtl(@Validated BOPopupVO vo, BindingResult bindingResult , HttpServletRequest request,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
|
||||
//정합성 검사
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
@@ -221,18 +303,34 @@ public class SetupPopupController {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다."+ wre.getMessage());
|
||||
log.error(wre.getMessage());
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다.");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다."+e);
|
||||
log.error(e.getMessage());
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다.");
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/updateBOPopupDtl", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
//팝업 수정 로직
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.updateBOPopupDtl(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/updateBOPopupDtl", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,19 +339,35 @@ public class SetupPopupController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deletePopup" , method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> deletePopup(SetupPopupVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@RequestMapping(value="/deletePopup" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deletePopup(BOPopupVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/deleteBOPopup", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
//팝업 삭제 로직
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.deleteBOPopup(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/popup/deleteBOPopup", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)@RequestMapping(value="/selectPopupPrevew")public String selectPopupPrevew(){return "/0";}
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectPopupPrevew")
|
||||
public String selectPopupPrevew(){return "/0";}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user