fo bo 머지작업(mngr)
This commit is contained in:
@@ -15,6 +15,8 @@ public class BOMaMssageSrchVO extends AbstractVO {
|
||||
public String srchType;
|
||||
/**검색어*/
|
||||
public String srchStr;
|
||||
/**쇼핑몰코드*/
|
||||
private String sopmalCd;
|
||||
/**검색 등록자 구분 */
|
||||
private String srchRegusrDv;
|
||||
/**발송 상태*/
|
||||
|
||||
@@ -230,9 +230,11 @@ public class BOMbrService {
|
||||
}
|
||||
}
|
||||
} catch (WnbtRestException wre) {
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +245,7 @@ public class BOMbrService {
|
||||
* @param vo 수정 추지훈
|
||||
*/
|
||||
@Transactional
|
||||
public Map<String, Object> updateBOMbrSecsn(BOWithdrawalVO vo) throws UnknownHostException {
|
||||
public Map<String, Object> updateBOMbrSecsn(BOWithdrawalVO vo){
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
try {
|
||||
//회원 고유번호
|
||||
@@ -272,9 +274,11 @@ public class BOMbrService {
|
||||
message.put("result", "success");
|
||||
|
||||
} catch (WnbtRestException wre) {
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return message;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.wb.domainserver.domain.gcone.mbr.mbr.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -57,6 +59,8 @@ public class BOMbrAppnVO extends AbstractVO {
|
||||
*/
|
||||
private String ordrInnb;
|
||||
/*메모*/
|
||||
@NotBlank(message = "사유")
|
||||
@Length(min = 1 , max = 1333)
|
||||
private String appnMemo;
|
||||
|
||||
/*출처 구분 코드*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.wb.domainserver.domain.gcone.ntcn.lgqymssage.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -25,8 +26,10 @@ public class BOLgqyMssageVO extends AbstractVO {
|
||||
/** 브랜드코드 */
|
||||
private String brandCd;
|
||||
/** 발송제목 */
|
||||
@NotBlank(message = "발송제목")
|
||||
private String sndngSj;
|
||||
/** 발송내용 */
|
||||
@NotBlank(message = "발송내용")
|
||||
private String sndngCn;
|
||||
/*발송 처리 구분*/
|
||||
private String sndngProcsDvCd;
|
||||
@@ -55,6 +58,7 @@ public class BOLgqyMssageVO extends AbstractVO {
|
||||
/** 발송상태 */
|
||||
private String sndngSttus;
|
||||
/** 요청자명 */
|
||||
@NotBlank(message = "요청자명")
|
||||
private String requsrNm;
|
||||
/**입력구분*/
|
||||
private String sndngDvCd;
|
||||
|
||||
@@ -1,15 +1,27 @@
|
||||
package com.wb.domainserver.domain.mngr.matchmb.controller;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.wb.domainserver.domain.gcone.analytics.service.BOAnalyticsService;
|
||||
import com.wb.domainserver.domain.gcone.analytics.vo.BOAnanlyticsErpGoodsSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.match.service.BOMatchMemberService;
|
||||
import com.wb.domainserver.domain.gcone.match.vo.BOMatchMemberVO;
|
||||
import com.wb.domainserver.domain.mngr.analytics.vo.AnalyticsErpGoodsSrchVO;
|
||||
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.dataaccess.DataMap;
|
||||
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;
|
||||
@@ -18,6 +30,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@@ -32,6 +47,17 @@ public class MatchMemberController {
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
@Autowired
|
||||
private BOAnalyticsService service;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private BOMatchMemberService matchMemberService;
|
||||
|
||||
@Value("${secret.key}")
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 회원 매칭 화면
|
||||
@@ -40,15 +66,28 @@ public class MatchMemberController {
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/view/match-member")
|
||||
public String matchMember (AnalyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String matchMember (BOAnanlyticsErpGoodsSrchVO vo , ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
log.debug("matchMember()");
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/match/view/match-member", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
// 작성자 정보 할당
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
log.debug(" 검색 파라미터 확인 리스트 검색조건 : {}", vo);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
List<DataMap> sopmalList = service.selectSopmalCd();
|
||||
content.put("sopmalList",sopmalList);
|
||||
|
||||
model.addAttribute("resultMap",content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/match/view/match-member", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/match/MatchMember";
|
||||
}
|
||||
@@ -59,12 +98,38 @@ public class MatchMemberController {
|
||||
*/
|
||||
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/select/match-member", method = RequestMethod.POST)
|
||||
@RequestMapping(value="/select/match-member", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectMatchMember(@RequestBody Map<String,Object> jsonData){
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/match/select/match-member", jsonData),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
log.debug("파라미터당 " + jsonData);
|
||||
String telNb = jsonData.get("telNb").toString();
|
||||
List<BOMatchMemberVO> result = new ArrayList<>();
|
||||
List<String> telnbList = Arrays.asList(telNb.split("\\s+"));
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
jsonData.put("secretKey",boCommonService.selectSecretkey());
|
||||
jsonData.put("telnbList",telnbList);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
result = matchMemberService.selectMatchMember(jsonData);
|
||||
|
||||
log.debug("결과 " + result);
|
||||
|
||||
content.put("matchMemberList",result);
|
||||
content.put("status", "success");
|
||||
content.put("message", "데이터 추출 성공");
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/match/select/match-member", jsonData),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,47 @@
|
||||
package com.wb.domainserver.domain.mngr.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.sopmal.service.BOMaSopmalService;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
||||
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.goods.goods.service.BOGoodsService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.service.BOMbrService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.*;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mlg.service.BOMlgService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOMlgSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
||||
import com.wb.domainserver.domain.gcone.promtn.coupon.service.BOCouponService;
|
||||
import com.wb.domainserver.domain.gcone.setup.gradbnef.service.BOGradbnefService;
|
||||
import com.wb.domainserver.domain.gcone.setup.gradbnef.vo.BOGradbnefVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.service.BOOrdrMngrService;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.vo.BOSetupOrdrVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.site.service.BOSiteService;
|
||||
import com.wb.domainserver.domain.mngr.mbr.vo.*;
|
||||
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 com.wb.domainserver.util.string.StringUtil;
|
||||
import com.wb.domainserver.util.util.Util;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
@@ -22,6 +49,10 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -56,6 +87,49 @@ public class MngrMbrController {
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMbrService service;
|
||||
|
||||
@Autowired
|
||||
private BOGradbnefService mbrGradService;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOGoodsService boGoodsService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
@Autowired
|
||||
private BOCouponService couponService;
|
||||
|
||||
@Autowired
|
||||
private BOMssageService boMssageService;
|
||||
|
||||
@Autowired
|
||||
private BOSiteService boSiteService;
|
||||
|
||||
@Autowired
|
||||
private BOOrdrService boOrdrService;
|
||||
|
||||
@Autowired
|
||||
private BOOrdrMngrService boOrdrMngrService;
|
||||
|
||||
@Autowired
|
||||
private BOMlgService boMlgService;
|
||||
|
||||
/**
|
||||
* 회원 목록 검색 폼 조회
|
||||
* @param vo
|
||||
@@ -63,14 +137,56 @@ public class MngrMbrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMbrListInqireForm")
|
||||
public String selectMbrListInqireForm(ModelMap model, MbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMbrListInqireForm(ModelMap model, BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//페이징값 가져오기
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMbrListInqireForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setSrchMbrDvCd(user.getMbrDvCd());
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
/*회원리스트 조회일때만*/
|
||||
if (!"Y".equals(vo.getPopDv())) {
|
||||
//리셀러 여부 o
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("appen", appen);
|
||||
}
|
||||
|
||||
//쇼핑몰 브랜드 검색
|
||||
List<DataMap> sopmal = new ArrayList<>();
|
||||
if ("integ".equals(vo.getReqPageDv())) {
|
||||
sopmal = maSopmalService.selectBOSopmalCdNm();
|
||||
content.put("sopmal", sopmal);
|
||||
}
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("vo", vo);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMbrListInqireForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/mbr/MbrListInqireRForm";
|
||||
}
|
||||
/**
|
||||
@@ -80,14 +196,52 @@ public class MngrMbrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value= "/selectMbrListInqire" , method = RequestMethod.POST)
|
||||
public String selectMbrListInqire(ModelMap model,MbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectMbrListInqire(ModelMap model,BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//BO 회원 목록조회 API 결과를 Map으로 변환하여 설정
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqire", vo),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//리셀러 여부 o
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
|
||||
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("resultMap", service.selectBOMbrListInqire(vo));
|
||||
content.put("appen", appen);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqire", vo),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
model.addAttribute("vo",vo);
|
||||
|
||||
return "mngr/mbr/MbrListInqireR";
|
||||
@@ -99,44 +253,130 @@ public class MngrMbrController {
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value="/updateMbrRslrMvmn")
|
||||
public ResponseEntity<WnbtResponse> updateMbrRslrMvmn (@Validated MbrAppnVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@PostMapping(value="/updateMbrRslrMvmn", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMbrRslrMvmn (@Validated BOMbrAppnVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
//BO API 호출 => 리셀러 등록
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrRslr", vo),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||
service.updateBOMbrRslr(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrRslr", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
/**
|
||||
* 회원 탈퇴
|
||||
* @param vo
|
||||
* @param bowithdrawalVO
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value="/updateMbrSecsnUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateMbrSecsnUpdt (@Validated WithdrawalVO vo,BindingResult bindingResult, HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@PostMapping(value="/updateMbrSecsnUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMbrSecsnUpdt (@Validated BOWithdrawalVO bowithdrawalVO, BindingResult bindingResult, HttpServletRequest request, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
//validation 체크
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
//ip주소 get
|
||||
Map<String,String> requestInfo = Util.getRequestInfo(request);
|
||||
String ip = (String) requestInfo.get("XForwardedFor");
|
||||
|
||||
//쇼핑몰 코드 추가
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
bowithdrawalVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
//BO API 호출 => 리셀러 등록
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrSecsn", vo),
|
||||
ReplyFromResrc::getReply
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if (StringUtil.isEmpty(bowithdrawalVO.getSopmalCd())) {//사용자
|
||||
bowithdrawalVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
bowithdrawalVO.setRegusr(user.getUserInnb());
|
||||
bowithdrawalVO.setUpdusr(user.getUserInnb());
|
||||
bowithdrawalVO.setSecretKey(commonService.selectSecretkey());
|
||||
|
||||
|
||||
if ("sopmal".equals(bowithdrawalVO.getServerDv())) {
|
||||
List<String> mbrArr = new ArrayList<>();
|
||||
List<String> mbrDvCdArr = new ArrayList<>();
|
||||
mbrArr.add(String.valueOf(user.getUserInnb()));
|
||||
mbrDvCdArr.add(String.valueOf(user.getMbrDvCd()));
|
||||
bowithdrawalVO.setMbrarr(mbrArr);
|
||||
bowithdrawalVO.setMbrDvCdArr(mbrDvCdArr);
|
||||
}
|
||||
|
||||
//관리자 로그 문장 만듦
|
||||
DataMap mngrLog = new DataMap();
|
||||
DataMap data = new DataMap();
|
||||
data.put("id", user.getMbrId());
|
||||
data.put("registIp", bowithdrawalVO.getRegistIp());
|
||||
data.put("before", "일반회원");
|
||||
data.put("after", "탈퇴회원");
|
||||
data.put("actionDv", "withdrawal");
|
||||
|
||||
mngrLog = service.makeMngrLog(data);
|
||||
|
||||
bowithdrawalVO.setMngrLogStrt(StringUtil.isNullToString(mngrLog.get("mngrLogStrt")));
|
||||
bowithdrawalVO.setMngrLogEnd(StringUtil.isNullToString(mngrLog.get("mngrLogEnd")));
|
||||
|
||||
//회원탈퇴
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.updateBOMbrSecsn(bowithdrawalVO);
|
||||
|
||||
//회원탈퇴 안내문자
|
||||
String result = (String) message.get("result");
|
||||
if ("success".equals(result)) {
|
||||
//메세지 타겟 대상
|
||||
List<DataMap> messageTarget = new ArrayList<>();
|
||||
List<DataMap> withdrawalList = new ArrayList<>();
|
||||
withdrawalList = (List<DataMap>) message.get("withdrawalList");
|
||||
//회원 고유번호
|
||||
if (!CollectionUtils.isEmpty(withdrawalList)) {
|
||||
//메시지
|
||||
Map<String, Object> sopmalInfoMap = new HashMap<>();
|
||||
BOMaSopmalVO vo = new BOMaSopmalVO();
|
||||
vo.setSopmalCd(bowithdrawalVO.getSopmalCd());
|
||||
DataMap sopmalInfo = (DataMap) sopmalInfoMap.get("sopmalInfo");
|
||||
for (DataMap withdrawal : withdrawalList) {
|
||||
DataMap mbrInfo = new DataMap();
|
||||
mbrInfo = service.selectSimpleMbrInfo(withdrawal);
|
||||
withdrawal.put("formDvCd", "FORM_DV_MBR");
|
||||
withdrawal.put("formDtlDvCd", "02");
|
||||
withdrawal.put("userid",mbrInfo.get("mbrId"));
|
||||
withdrawal.put("sopmalCd", vo.getSopmalCd());
|
||||
messageTarget.add(withdrawal);
|
||||
}
|
||||
|
||||
boMssageService.insertBOAtmcsndng(messageTarget);
|
||||
}
|
||||
}
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/updateBOMbrSecsn", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,19 +394,79 @@ public class MngrMbrController {
|
||||
}
|
||||
/**
|
||||
* 마일리지 목록 조회
|
||||
* @param mlgSrchVO
|
||||
* @param boMlgSrchVO
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMlgManagePopup")
|
||||
public String selectMlgManagePopup(ModelMap model,MlgSrchVO mlgSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
mlgSrchVO.setSopmalCd(authSopmalCd);
|
||||
public String selectMlgManagePopup(ModelMap model, BOMlgSrchVO boMlgSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
boMlgSrchVO.setSopmalCd(authSopmalCd);
|
||||
//BO 회원 목록조회 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mlg/selectBOMlgManagePopupForm", mlgSrchVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if ("sopmal".equals(boMlgSrchVO.getServerDv())) {
|
||||
boMlgSrchVO.setMbrDvCd(user.getMbrDvCd());
|
||||
boMlgSrchVO.setMbrInnb(user.getUserInnb());
|
||||
}
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boMlgSrchVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
//마일리지 적립 구분 코드
|
||||
bOMaComncdVO.setGroupCd("MLG_ACCML_DV");
|
||||
List<?> mlgAccmlDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
//마일리지 적용 사유 구분 코드
|
||||
bOMaComncdVO.setGroupCd("MLG_APPLC_DV");
|
||||
List<?> mlgApplcDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
//마일리지 지급/차감 구분
|
||||
bOMaComncdVO.setGroupCd("MLG_DV");
|
||||
List<?> mlgDv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
List<?> sopmalList = maSopmalService.selectBOSopmalCdNm();
|
||||
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
DataMap content = new DataMap();
|
||||
content.put("paramVO", boMlgSrchVO);
|
||||
content.put("mlgAccmlDv", mlgAccmlDv);
|
||||
content.put("mlgApplcDv", mlgApplcDv);
|
||||
content.put("mlgDv", mlgDv);
|
||||
content.put("sopmalList", sopmalList);
|
||||
//관리자명
|
||||
content.put("mngrId", user.getMbrId());
|
||||
DataMap mngrInfoParamMap = new DataMap();
|
||||
mngrInfoParamMap.put("mngrId", user.getMbrId());
|
||||
mngrInfoParamMap.put("mngrInnb", user.getUserInnb());
|
||||
content.put("mngrNm", boMlgService.selectBOMlgMngrInfoInqire(mngrInfoParamMap));
|
||||
|
||||
//회원명
|
||||
content.put("mbrInfoMap", boMlgService.selectBOMlgMbrInfoInqire(boMlgSrchVO));
|
||||
|
||||
//마일리지 기본 유효기간 조회
|
||||
content.put("mlgValidPd", boMlgService.selectBOMlgValidPd(boMlgSrchVO));
|
||||
|
||||
|
||||
|
||||
//잔액 합계
|
||||
BigDecimal blceSum = boMlgService.selectBOMlgBlceSum(boMlgSrchVO);
|
||||
content.put("blceSum", blceSum);
|
||||
//30일이내 소멸예정 합계
|
||||
BigDecimal endInMnthBlceSum = boMlgService.selectBOEndInMnthMlgBlceSum(boMlgSrchVO);
|
||||
content.put("endInMnthBlceSum", endInMnthBlceSum);
|
||||
|
||||
// 적립 예정 마일리지
|
||||
String accmlPrearngeSum = boMlgService.selectBOAccmlPrearngeSum(boMlgSrchVO);
|
||||
content.put("accmlPrearngeSum", accmlPrearngeSum);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mlg/selectBOMlgManagePopupForm", mlgSrchVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
return "mngr/mbr/MlgManagePopupR";
|
||||
}
|
||||
/**
|
||||
@@ -176,14 +476,57 @@ public class MngrMbrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMbrSrchPopupRForm")
|
||||
public String selectMbrSrchPopupRForm(ModelMap model, MbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectMbrSrchPopupRForm(ModelMap model, BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setPopDv("Y");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMbrListInqireForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setSrchMbrDvCd(user.getMbrDvCd());
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
/*회원리스트 조회일때만*/
|
||||
if (!"Y".equals(vo.getPopDv())) {
|
||||
//리셀러 여부 o
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("appen", appen);
|
||||
}
|
||||
|
||||
//쇼핑몰 브랜드 검색
|
||||
List<DataMap> sopmal = new ArrayList<>();
|
||||
if ("integ".equals(vo.getReqPageDv())) {
|
||||
sopmal = maSopmalService.selectBOSopmalCdNm();
|
||||
content.put("sopmal", sopmal);
|
||||
}
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("vo", vo);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMbrListInqireForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/mbr/MbrSrchPopupRForm";
|
||||
}
|
||||
|
||||
@@ -194,14 +537,51 @@ public class MngrMbrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMbrSrchPopupRInqire")
|
||||
public String selectMbrSrchPopupRInqire(ModelMap model, MbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectMbrSrchPopupRInqire(ModelMap model, BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//BO 회원 목록조회 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMbrListInqire", vo),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//리셀러 여부 o
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
|
||||
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("resultMap", service.selectBOMbrListInqire(vo));
|
||||
content.put("appen", appen);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMbrListInqire", vo),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
model.addAttribute("vo",vo);
|
||||
return "mngr/mbr/MbrSrchPopupR";
|
||||
}
|
||||
@@ -212,14 +592,34 @@ public class MngrMbrController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectSndngTargtMbr")
|
||||
public ResponseEntity<WnbtResponse> selectSndngTargtMbr(MbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/selectSndngTargtMbr", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectSndngTargtMbr(BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
/*검색어에 해당하는 회원 조회*/
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOSndngTargtMbr", vo),
|
||||
ReplyFromResrc::getReply
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result = service.selectBOSndngTargtMbr(vo);
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("result", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOSndngTargtMbr", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -228,13 +628,26 @@ public class MngrMbrController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectSndngTargtMbrInfo")
|
||||
public ResponseEntity<WnbtResponse> selectSndngTargtMbrInfo(MbrVO vo){
|
||||
@RequestMapping(value="/selectSndngTargtMbrInfo", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectSndngTargtMbrInfo(BOMbrVO vo){
|
||||
/*검색어에 해당하는 회원 조회*/
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOSimpleMbrInfo", vo),
|
||||
ReplyFromResrc::getReply
|
||||
vo.setSecretKey(commonService.selectSecretkey());
|
||||
List<DataMap> mbr = service.selectSimpleMbrInfoList(vo);
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
if(!CollectionUtils.isEmpty(mbr)){
|
||||
map.put("mbrInfoCnt",mbr.size());
|
||||
}
|
||||
map.put("mbrInfo",mbr);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(map))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOSimpleMbrInfo", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,14 +657,33 @@ public class MngrMbrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMarketingTrgetSrchPopupForm")
|
||||
public String selectMarketingTrgetSrchPopupForm(ModelMap model, MbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectMarketingTrgetSrchPopupForm(ModelMap model, BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setPopDv("Y");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMarketingTrgetSrchPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
|
||||
//등급
|
||||
List<DataMap> grad = new ArrayList<>();
|
||||
BOGradbnefVO bnefVO = new BOGradbnefVO();
|
||||
bnefVO.setSopmalCd(vo.getSopmalCd());
|
||||
grad = mbrGradService.selectBOMbrGradListInqireWithoutPaging(bnefVO);
|
||||
|
||||
//공통코드
|
||||
//성별
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SEX");
|
||||
List<?> sex = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("sex", sex);
|
||||
content.put("grad", grad);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOMarketingTrgetSrchPopupForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
model.addAttribute("vo",vo);
|
||||
return "mngr/mbr/MarketingTrgetSrchPopupRForm";
|
||||
}
|
||||
@@ -263,14 +695,23 @@ public class MngrMbrController {
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMarketingTrgetSrchPopupInqire")
|
||||
public ResponseEntity<WnbtResponse> selectMarketingTrgetSrchPopupInqire(MarktMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/selectMarketingTrgetSrchPopupInqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectMarketingTrgetSrchPopupInqire(BOMarktMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
/*검색어에 해당하는 회원 조회*/
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMarktTrgetCnt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
int cnt = service.selectBOMarktTrgetListCnt(vo);
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("cnt",cnt);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(map))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMarktTrgetCnt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,39 @@
|
||||
package com.wb.domainserver.domain.mngr.mngrstr.controller;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
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.vo.BOMaSopmalVO;
|
||||
import com.wb.domainserver.domain.admin.user.mngr.service.BOJobUserService;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.common.vo.BOCommonVO;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.service.BOMbrService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||
import com.wb.domainserver.domain.gcone.mngrstr.service.BOMngrStrService;
|
||||
import com.wb.domainserver.domain.gcone.mngrstr.vo.BOMngrStrVO;
|
||||
import com.wb.domainserver.domain.mngr.mbr.vo.MbrVO;
|
||||
import com.wb.domainserver.domain.mngr.mngrstr.vo.MngrStrVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.exception.code.ErrorCode;
|
||||
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 com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||
import com.wb.domainserver.util.file.service.FileStorageService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
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;
|
||||
@@ -54,6 +73,20 @@ public class MngrStrController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMngrStrService service;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalservice;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOMbrService boMbrService;
|
||||
/**
|
||||
* 매장 목록 검색 화면
|
||||
* @param model
|
||||
@@ -62,21 +95,60 @@ public class MngrStrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMngrStrListRForm")
|
||||
public String selectStrListRForm(ModelMap model, MngrStrVO vo) {
|
||||
// BO 매장 목록 조회 호출
|
||||
public String selectStrListRForm(ModelMap model, BOMngrStrVO vo) {
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//페이징정보
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("BOMngrStrVO", vo);
|
||||
//관리법인
|
||||
content.put("manageCpr", service.selectBOMngrStrComnCd("MANAGE_CPR"));
|
||||
//대표 브랜드
|
||||
content.put("reprsntBrand", service.selectBOMngrStrComnCd("REPRSNT_BRAND"));
|
||||
//취급 브랜드
|
||||
content.put("trtmntBrand", service.selectBOMngrStrComnCd("TRTMNT_BRAND"));
|
||||
|
||||
try {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrListInqireForm", vo),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
// model.addAttribute("mngrStrVO", vo);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String trtmntBrandJson = objectMapper.writeValueAsString(service.selectBOMngrStrComnCd("TRTMNT_BRAND"));
|
||||
content.put("trtmntBrandJson", trtmntBrandJson);
|
||||
}catch(JsonProcessingException jpe){
|
||||
log.error(jpe.getMessage());
|
||||
throw new WnbtRestException(ErrorCode.JACKSON_PROCESS_ERROR);
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
log.error(e.getMessage());
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
//매장개설구분
|
||||
content.put("strEstblDvCd", service.selectBOMngrStrComnCd("STR_ESTBL_DV"));
|
||||
//매장운영구분
|
||||
content.put("strOperDv", service.selectBOMngrStrComnCd("STR_DV"));
|
||||
//상태
|
||||
content.put("tentSttus", service.selectBOMngrStrComnCd("TENT_STTUS"));
|
||||
//포스코드-구분값
|
||||
content.put("posCdDvVal", service.selectBOMngrStrComnCd("POS_HDQRTRS"));
|
||||
|
||||
model.addAttribute("resultListMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrListInqireForm", vo),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
|
||||
return "mngr/mngrstr/StoreListRForm";
|
||||
}
|
||||
|
||||
@@ -88,20 +160,34 @@ public class MngrStrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMngrStrList")
|
||||
public String selectStrList(ModelMap model, MngrStrVO vo) {
|
||||
// BO 매장 목록 조회 호출
|
||||
try {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrListInqire", vo),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
public String selectStrList(ModelMap model, BOMngrStrVO vo) {
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//매장 목록 조회 결과 및 페이징정보
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("boCtrlMap", service.selectBOMngrStrListInqire(vo));
|
||||
content.put("BOMngrStrVO", vo);
|
||||
|
||||
model.addAttribute("resultListMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrListInqire", vo),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
model.addAttribute("mngrStrVO", vo);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return "mngr/mngrstr/StoreListR";
|
||||
}
|
||||
@@ -113,18 +199,37 @@ public class MngrStrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMngrStrListExcelDwld")
|
||||
public void selectMngrStrListExcelDwld(MngrStrVO vo, HttpServletResponse response) {
|
||||
public void selectMngrStrListExcelDwld(BOMngrStrVO vo, HttpServletResponse response) {
|
||||
//10000건까지 엑셀 출력
|
||||
vo.setPageIndex(1);
|
||||
vo.setPageUnit(10000);
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrListInqire", vo)
|
||||
);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//매장 목록 조회 결과 및 페이징정보
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("boCtrlMap", service.selectBOMngrStrListInqire(vo));
|
||||
content.put("BOMngrStrVO", vo);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrListInqire", vo)
|
||||
// );
|
||||
|
||||
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
||||
if(resultMap != null) {
|
||||
resultMapList = (List<Map<String, Object>>) resultMap.get("boCtrlMap");
|
||||
if(content != null) {
|
||||
resultMapList = (List<Map<String, Object>>) content.get("boCtrlMap");
|
||||
}
|
||||
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
@@ -181,6 +286,10 @@ public class MngrStrController {
|
||||
try {
|
||||
ExcelDownloadUtil.createExcel("mngr_str_list" + str, headerMap, dataList, response);
|
||||
}catch(IOException ioe) {
|
||||
log.error(ioe.getMessage());
|
||||
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage());
|
||||
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
||||
}
|
||||
}
|
||||
@@ -212,18 +321,40 @@ public class MngrStrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMngrStrDtlU")
|
||||
public String selectStrDtlU(ModelMap model, MngrStrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectStrDtlU(ModelMap model, BOMngrStrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
// BO 매장 목록 조회 호출
|
||||
try {
|
||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrDtlInqire", vo)
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
//매장 상세 조회 결과
|
||||
DataMap boCtrlMap = service.selectBOMngrStrDtlInqire(vo);
|
||||
content.put("boCtrlMap", boCtrlMap);
|
||||
content.put("BOMngrStrVO", vo);
|
||||
|
||||
//쇼핑몰 상세 조회(쇼핑몰 도메인 조회용)
|
||||
BOMaSopmalVO boMaSopmalVO = new BOMaSopmalVO();
|
||||
boMaSopmalVO.setSopmalCd((String) boCtrlMap.get("reprsntBrandCd"));
|
||||
content.put("sopmalDetail", maSopmalservice.selectBOSopmalUpdtForm(boMaSopmalVO));
|
||||
|
||||
//대표 브랜드
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String reprsntBrandJson = objectMapper.writeValueAsString(service.selectBOMngrStrComnCd("REPRSNT_BRAND"));
|
||||
content.put("reprsntBrandJson", reprsntBrandJson);
|
||||
|
||||
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOMngrStrDtlInqire", vo)
|
||||
// );
|
||||
|
||||
String kakaoKey = "";
|
||||
if(resultMap.containsKey("BOMngrStrVO")){
|
||||
Map<String, Object> paramVO = (Map<String, Object>) resultMap.get("BOMngrStrVO");
|
||||
if(content.containsKey("BOMngrStrVO")){
|
||||
Map<String, Object> paramVO = (Map<String, Object>) content.get("BOMngrStrVO");
|
||||
|
||||
if(!ObjectUtils.isEmpty(paramVO.get("sopmalCd"))){
|
||||
kakaoKey = kakaoProperties.getKeyForDomain(paramVO.get("sopmalCd").toString());
|
||||
@@ -231,12 +362,14 @@ public class MngrStrController {
|
||||
}
|
||||
|
||||
model.addAttribute("kakaoKey", kakaoKey);
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
model.addAttribute("resultMap", content);
|
||||
// model.addAttribute("MngrStrVO", vo);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage());
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
log.error(e.getMessage());
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/mngrstr/StoreDtlU";
|
||||
@@ -247,12 +380,26 @@ public class MngrStrController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectIdDplctCnfirm")
|
||||
public ResponseEntity<WnbtResponse> selectIdDplctCnfirm(MngrStrVO vo, BindingResult bindingResult){
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOIdDplctCnfirm", vo),
|
||||
ReplyFromResrc::getReply
|
||||
@RequestMapping(value="/selectIdDplctCnfirm", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectIdDplctCnfirm(BOMbrVO vo, BindingResult bindingResult){
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setMbrDvCd(boMbrService.selectBOMbrDvCd(vo));
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content = boMbrService.selectBOIdDplctCnfirm(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/selectBOIdDplctCnfirm", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,8 +409,8 @@ public class MngrStrController {
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateMngrStrDtlU", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateMngrStrDtlU(@Validated MngrStrVO vo, HttpServletRequest request, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@RequestMapping(value = "/updateMngrStrDtlU", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMngrStrDtlU(@Validated BOMngrStrVO vo, HttpServletRequest request, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
@@ -300,10 +447,65 @@ public class MngrStrController {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/updateBOMngrStrDtlU", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
if(vo.getChangePasswordAt().equals("Y")){
|
||||
BOCommonVO commVO = new BOCommonVO();
|
||||
commVO.setPass(vo.getNewPassword()); // 변경할 비밀번호
|
||||
commVO.setEncptKeyDvCd("03"); // 매장
|
||||
commVO.setIdntfcInnb(String.valueOf(vo.getStrInnb())); // 회원고유번호
|
||||
|
||||
//변경할 비밀번호 암호화
|
||||
String newPwd = commonService.generateKey(commVO);
|
||||
vo.setNewPassword(newPwd);
|
||||
}
|
||||
|
||||
List<HashMap<String, Object>> fileInfoList = vo.getFileInfo();
|
||||
int fileIndex = 0;
|
||||
|
||||
// 매장 대표이미지
|
||||
// 파일 업로드를 통해 대표이미지를 추가했을 때
|
||||
if (vo.getStrReprsntImg() != null && vo.getStrReprsntImg().equals("1")) {
|
||||
fileIndex = 1;
|
||||
if (!fileInfoList.isEmpty()) {
|
||||
String filePath = fileInfoList.get(0).get("filePath").toString().replace("\\", "/");
|
||||
String fileId = fileInfoList.get(0).get("fileId").toString();
|
||||
vo.setStrReprsntImg(filePath + "/" + fileId);
|
||||
}
|
||||
}
|
||||
|
||||
// 매장 상세이미지
|
||||
String strDtlImg = vo.getStrDtlImg();
|
||||
for (; fileIndex < fileInfoList.size(); fileIndex++) {
|
||||
Map<String, Object> fileInfo = fileInfoList.get(fileIndex);
|
||||
String filePath = fileInfo.get("filePath").toString().replace("\\", "/");
|
||||
String fileId = fileInfo.get("fileId").toString();
|
||||
|
||||
if (strDtlImg.isEmpty()) {
|
||||
strDtlImg = filePath + "/" + fileId;
|
||||
} else {
|
||||
strDtlImg += "|" + filePath + "/" + fileId;
|
||||
}
|
||||
}
|
||||
vo.setStrDtlImg(strDtlImg);
|
||||
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = service.updateBOMngrStrDtlU(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mngrstr/updateBOMngrStrDtlU", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
@@ -332,16 +534,35 @@ public class MngrStrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectPosJoinMbrUrlList")
|
||||
public String selectPosJoinMbrUrlList(MbrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
public String selectPosJoinMbrUrlList(BOMbrVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
// BO 회원 목록조회 API 호출
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOPosJoinMbrUrl", vo)
|
||||
, model
|
||||
,"resultMap"
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
|
||||
// 페이징 객체 생성 & 페이징정보 할당
|
||||
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());
|
||||
|
||||
vo.setSecretKey(commonService.selectSecretkey());
|
||||
resultList = boMbrService.selectBOPosJoinMbrUrl(vo);
|
||||
content.put("list", resultList);
|
||||
content.put("vo", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO,"/gcone/mbr/mbr/selectBOPosJoinMbrUrl", vo)
|
||||
// , model
|
||||
// ,"resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/mngrstr/StorePosJoinMbrListR";
|
||||
}
|
||||
|
||||
@@ -1,20 +1,38 @@
|
||||
package com.wb.domainserver.domain.mngr.ntcn.atmcsndng.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.ntcn.atmcsndng.service.BOMaAtmcSndngService;
|
||||
import com.wb.domainserver.domain.admin.ntcn.atmcsndng.vo.BOMaAtmcSndngVO;
|
||||
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.mssage.service.BOMaMssageService;
|
||||
import com.wb.domainserver.domain.admin.ntcn.mssage.vo.BOMaMssageSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.atmcsndng.service.BOAtmcSndngService;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageSrchVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.atmcsndng.vo.AtmcSndngVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.MssageSrchVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.exception.code.ErrorCode;
|
||||
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;
|
||||
@@ -26,6 +44,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -62,6 +81,23 @@ public class AtmcSndngController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMaAtmcSndngService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaMssageService boMaMessageService;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private BOMaEmailService boMaEmailService;
|
||||
|
||||
@Autowired
|
||||
private BOAtmcSndngService boAtmcSndngService;
|
||||
/**
|
||||
* 자동 발송 관리 페이지
|
||||
* @return String
|
||||
@@ -79,26 +115,48 @@ public class AtmcSndngController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectAtmcSndngManageListInqire")
|
||||
public String selectAtmcSndngManageListInqire(AtmcSndngVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
public String selectAtmcSndngManageListInqire(BOMaAtmcSndngVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
try {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBOAtmcSndngManageListInqire", vo)
|
||||
);
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setFormDvCd("FORM_DV_");
|
||||
|
||||
//시스템 02
|
||||
vo.setMngrDv("02");
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//검색 폼 code
|
||||
List<DataMap> sopmal = service.selectBOSopmalAtmcSndng();
|
||||
content.put("sopmal",sopmal);
|
||||
//초기 쇼핑몰 코드 없을 경우 목록의 첫번째 입력
|
||||
if("".equals(StringUtil.isNullToString(vo.getSopmalCd()))) {
|
||||
vo.setSopmalCd(StringUtil.isNullToString(sopmal.get(0).get("sopmalCd")));
|
||||
}
|
||||
content.put("bOAtmcSndngVO", vo);
|
||||
content.put("boCtrlMap", service.selectBOAtmcSndngManageListInqire(vo));
|
||||
content.put("shopAtmcSndntTme", service.selectBOShopAtmcSndngTme(vo));
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBOAtmcSndngManageListInqire", vo)
|
||||
// );
|
||||
|
||||
// model.addAttribute("resultMap", resultMap.get("boCtrlMap"));
|
||||
model.addAttribute("resultListMap", resultMap.get("boCtrlMap"));
|
||||
model.addAttribute("bOAtmcSndngVO",resultMap.get("bOAtmcSndngVO"));
|
||||
model.addAttribute("resultListMap", content.get("boCtrlMap"));
|
||||
model.addAttribute("bOAtmcSndngVO",content.get("bOAtmcSndngVO"));
|
||||
|
||||
model.addAttribute("shopAtmcSndntTme", resultMap.get("shopAtmcSndntTme"));
|
||||
model.addAttribute("shopAtmcSndntTme", content.get("shopAtmcSndntTme"));
|
||||
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/atmcsndng/AtmcSndngListR";
|
||||
@@ -106,24 +164,38 @@ public class AtmcSndngController {
|
||||
|
||||
/**
|
||||
* 자동 발송 관리 페이지 > 자동 발송 관리 - 자동 발송 관리 수정
|
||||
* @param vo
|
||||
* @param boAtmcSndngVO
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateAtmcSndngManageUpdt", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateAtmcSndngManageUpdt(@Validated AtmcSndngVO atmcSndngVO, BindingResult bindingResult
|
||||
@RequestMapping(value="/updateAtmcSndngManageUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateAtmcSndngManageUpdt(@Validated BOMaAtmcSndngVO boAtmcSndngVO, BindingResult bindingResult
|
||||
, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
atmcSndngVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
boAtmcSndngVO.setSopmalCd(authSopmalCd);
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/updateBOAtmcSndngManageUpdt", atmcSndngVO),
|
||||
ReplyFromResrc::getReply
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boAtmcSndngVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
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, "/gcone/ntcn/atmcsnd/updateBOAtmcSndngManageUpdt", atmcSndngVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
@@ -144,30 +216,57 @@ public class AtmcSndngController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageAtmcSndngListInqire")
|
||||
public String selectMssageAtmcSndngListInqire(ModelMap model, MssageSrchVO mssageSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
if(mssageSrchVO.getSrchDv() == null) {
|
||||
public String selectMssageAtmcSndngListInqire(ModelMap model, BOMaMssageSrchVO bOMaMssageSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
if(bOMaMssageSrchVO.getSrchDv() == null) {
|
||||
List<String> srchDvList = new ArrayList<>();
|
||||
srchDvList.add("SMS");
|
||||
srchDvList.add("LMS");
|
||||
mssageSrchVO.setSrchDv(srchDvList);
|
||||
bOMaMssageSrchVO.setSrchDv(srchDvList);
|
||||
}
|
||||
mssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
bOMaMssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
// BO 이메일 발송 내역 조회 호출
|
||||
try {
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBOSmsSndngListInqire",mssageSrchVO)
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
bOMaMssageSrchVO.setRegusr(user.getUserInnb());
|
||||
bOMaMssageSrchVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
DataMap content = 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());
|
||||
|
||||
//메시지 발송 목록 조회 결과 및 페이징정보 넣기
|
||||
content.put("paginationInfo", bOMaMssageSrchVO.getPaginationInfo());
|
||||
content.put("mssageMap", boMaMessageService.selectBOSmsSndngListInqire(bOMaMssageSrchVO));
|
||||
content.put("bOMaMssageSrchVO", bOMaMssageSrchVO);
|
||||
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBOSmsSndngListInqire",mssageSrchVO)
|
||||
// );
|
||||
|
||||
|
||||
//BO 이메일 발송내 목록 조회 API 결과를 Map으로 변환하여 설정
|
||||
model.addAttribute("resultListMap", resultMap);
|
||||
model.addAttribute("mssageSrchVO",mssageSrchVO);
|
||||
model.addAttribute("resultListMap", content);
|
||||
model.addAttribute("mssageSrchVO",bOMaMssageSrchVO);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/atmcsndng/MssageAtmcSndngListR";
|
||||
@@ -179,15 +278,17 @@ public class AtmcSndngController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageAtmcSndngDtlPopup")
|
||||
public String selectMssageAtmcSndngDtlPopup(MssageSrchVO mssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
public String selectMssageAtmcSndngDtlPopup(BOMaMssageSrchVO bOMaMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
bOMaMssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
mssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBOSmsSndngDtlInfo", mssageSrchVO)
|
||||
);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("mssageDtlMap", boMaMessageService.selectBOSmsSndngDtlInfo(bOMaMssageSrchVO));
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBOSmsSndngDtlInfo", mssageSrchVO)
|
||||
// );
|
||||
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
model.addAttribute("resultMap", content);
|
||||
|
||||
return "mngr/ntcn/atmcsndng/MssageAtmcSndngDtlPopupR";
|
||||
}
|
||||
@@ -209,26 +310,54 @@ public class AtmcSndngController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectEmailAtmcSndngListInqire")
|
||||
public String selectEmailAtmcSndngListInqire(ModelMap model, MaEmailSrchVO maEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectEmailAtmcSndngListInqire(ModelMap model, BOMaEmailSrchVO bOMaEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
//TODO : 각 쇼핑몰 화면에서 파라미터 가져와야 함
|
||||
maEmailSrchVO.setAtmcAt("Y");
|
||||
maEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
bOMaEmailSrchVO.setAtmcAt("Y");
|
||||
bOMaEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
|
||||
// BO 이메일 발송 내역 조회 호출
|
||||
try {
|
||||
|
||||
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> 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());
|
||||
|
||||
//BO 이메일 발송내 목록 조회 API 결과를 Map으로 변환하여 설정
|
||||
model.addAttribute("resultListMap", resultMap);
|
||||
model.addAttribute("emailSrchVO",maEmailSrchVO);
|
||||
//시크릿 키 설정
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
bOMaEmailSrchVO.setSecretKey(secretKey);
|
||||
|
||||
//이메일 발송 내역 조회 결과 및 페이징정보 넣기
|
||||
content.put("paginationInfo", bOMaEmailSrchVO.getPaginationInfo());
|
||||
content.put("boCtrlMap", boMaEmailService.selectBOMaEmailSndngListInqire(bOMaEmailSrchVO));
|
||||
content.put("BOMaEmailSrchVO", bOMaEmailSrchVO);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO)
|
||||
// );
|
||||
|
||||
model.addAttribute("resultListMap", content);
|
||||
model.addAttribute("emailSrchVO",bOMaEmailSrchVO);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/atmcsndng/EmailAtmcSndngListR";
|
||||
@@ -251,39 +380,76 @@ public class AtmcSndngController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectNtcntalkAtmcSndngListInqire")
|
||||
public String selectNtcntalkAtmcSndngListInqire(ModelMap model, MssageSrchVO mssageSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectNtcntalkAtmcSndngListInqire(ModelMap model, BOMssageSrchVO bOMssageSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
List<String> srchDvList = new ArrayList<>();
|
||||
srchDvList.add("AT");
|
||||
srchDvList.add("AI");
|
||||
mssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
mssageSrchVO.setSrchDv(srchDvList);
|
||||
if(mssageSrchVO.getSrchStrtSndngDt().equals("") && mssageSrchVO.getSrchEndSndngDt().equals("") ) {
|
||||
bOMssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
bOMssageSrchVO.setSrchDv(srchDvList);
|
||||
if(bOMssageSrchVO.getSrchStrtSndngDt().equals("") && bOMssageSrchVO.getSrchEndSndngDt().equals("") ) {
|
||||
LocalDate today = LocalDate.now();
|
||||
if(today != null) {
|
||||
LocalDate ago3M = today.minusMonths(3);
|
||||
mssageSrchVO.setSrchDtDv("sndngDt");
|
||||
bOMssageSrchVO.setSrchDtDv("sndngDt");
|
||||
if(ago3M != null) {
|
||||
mssageSrchVO.setSrchStrtSndngDt(ago3M.toString());
|
||||
mssageSrchVO.setSrchEndSndngDt(today.toString());
|
||||
bOMssageSrchVO.setSrchStrtSndngDt(ago3M.toString());
|
||||
bOMssageSrchVO.setSrchEndSndngDt(today.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// BO 이메일 발송 내역 조회 호출
|
||||
try {
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBONtcntalkAtmcSndngListInqire", mssageSrchVO)
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
bOMssageSrchVO.setRegusr(user.getUserInnb());
|
||||
bOMssageSrchVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
bOMssageSrchVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
String sopmalCd = bOMssageSrchVO.getSopmalCd();
|
||||
|
||||
if(sopmalCd != null ) {
|
||||
bOMssageSrchVO.setSopmalCd(sopmalCd);
|
||||
}
|
||||
|
||||
//시스템 03 고정
|
||||
bOMssageSrchVO.setSrchRegusrDv("03");
|
||||
|
||||
|
||||
//BO 이메일 발송내 목록 조회 API 결과를 Map으로 변환하여 설정
|
||||
model.addAttribute("resultListMap", resultMap);
|
||||
model.addAttribute("mssageSrchVO",mssageSrchVO);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(bOMssageSrchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(bOMssageSrchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(bOMssageSrchVO.getPageSize());
|
||||
bOMssageSrchVO.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
bOMssageSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
bOMssageSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
bOMssageSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//메시지 목록 조회 결과 및 페이징정보 넣기
|
||||
|
||||
content.put("paginationInfo", bOMssageSrchVO.getPaginationInfo());
|
||||
content.put("boCtrlMap", boAtmcSndngService.selectBOSmsSndngListInqire(bOMssageSrchVO));
|
||||
content.put("bOAtmcSndngVO", bOMssageSrchVO);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/atmcsnd/selectBONtcntalkAtmcSndngListInqire", mssageSrchVO)
|
||||
// );
|
||||
|
||||
model.addAttribute("resultListMap", content);
|
||||
model.addAttribute("mssageSrchVO",bOMssageSrchVO);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/atmcsndng/NtcntalkAtmcSndngListR";
|
||||
|
||||
@@ -1,23 +1,44 @@
|
||||
package com.wb.domainserver.domain.mngr.ntcn.email.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.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.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.BOMbrSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.email.service.BOEmailService;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.email.vo.BOEmailVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.service.BOOrdrMngrService;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.vo.BOSetupOrdrVO;
|
||||
import com.wb.domainserver.domain.mngr.mbr.vo.MbrSrchVO;
|
||||
import com.wb.domainserver.domain.mngr.mbr.vo.MbrVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.email.vo.EmailVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.exception.code.ErrorCode;
|
||||
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.file.service.FileStorageService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -70,6 +91,22 @@ public class EmailController {
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
|
||||
@Autowired
|
||||
private BOMaEmailService service;
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
@Autowired
|
||||
private BOOrdrMngrService boOrdrMngrService;
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
@Autowired
|
||||
private BOEmailService boEmailService;
|
||||
@Autowired
|
||||
private BOMbrService mbrService;
|
||||
/*****************************************************
|
||||
이메일 발송 관리 START
|
||||
*****************************************************/
|
||||
@@ -90,23 +127,53 @@ public class EmailController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectEmailPassivSndng")
|
||||
public String selectEmailPassivSndng(ModelMap model, MaEmailSrchVO maEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
maEmailSrchVO.setAtmcAt("N");
|
||||
maEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
public String selectEmailPassivSndng(ModelMap model, BOMaEmailSrchVO bOMaEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
bOMaEmailSrchVO.setAtmcAt("N");
|
||||
bOMaEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
|
||||
try {
|
||||
String srchShop = bOMaEmailSrchVO.getSrchShop();
|
||||
if (srchShop == null) {
|
||||
bOMaEmailSrchVO.setSrchShop(MemberJwtContextHolder.getMemberInfo().getSopmalCd());
|
||||
} else if (srchShop.equals("ALL")) {
|
||||
bOMaEmailSrchVO.setSrchShop(null);
|
||||
}
|
||||
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);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
//페이징 처리를 위한 값 설정
|
||||
bOMaEmailSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
bOMaEmailSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
bOMaEmailSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
model.addAttribute("emailSrchVO", maEmailSrchVO);
|
||||
//시크릿 키 설정
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
bOMaEmailSrchVO.setSecretKey(secretKey);
|
||||
|
||||
//이메일 발송 내역 조회 결과 및 페이징정보 넣기
|
||||
content.put("paginationInfo", bOMaEmailSrchVO.getPaginationInfo());
|
||||
content.put("boCtrlMap", service.selectBOMaEmailSndngListInqire(bOMaEmailSrchVO));
|
||||
content.put("BOMaEmailSrchVO", bOMaEmailSrchVO);
|
||||
|
||||
model.addAttribute("resultListMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
|
||||
model.addAttribute("emailSrchVO", bOMaEmailSrchVO);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/email/EmailPassivSndngC";
|
||||
@@ -114,40 +181,88 @@ public class EmailController {
|
||||
|
||||
/**
|
||||
* 이메일 발송 관리 > 이메일 수동 발송 - 최근 이메일 불러오기
|
||||
* @param maEmailSrchVO
|
||||
* @param bOMaEmailSrchVO
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectEmailSndngDtl")
|
||||
@ResponseBody
|
||||
public Map<String, Object> selectEmailSndngDtl(MaEmailSrchVO maEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
maEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
//BO에서 API 호출(이메일 발송내 목록 조회)
|
||||
// model.addAttribute("resultMapDtl", BoResultMapConverter.convert(new ObjectMapper(), reply.getReply()));
|
||||
public Map<String, Object> selectEmailSndngDtl(BOMaEmailSrchVO bOMaEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
bOMaEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngDtlInfo", maEmailSrchVO)
|
||||
);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
return resultMap;
|
||||
//시크릿 키 설정
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
bOMaEmailSrchVO.setSecretKey(secretKey);
|
||||
|
||||
content.put("boCtrlMap", service.selectBOMaEmailSndngDtlInfo(bOMaEmailSrchVO));
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngDtlInfo", maEmailSrchVO)
|
||||
// );
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 팝업 폼
|
||||
* @param mbrSrchVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMbrSrchPopupRForm")
|
||||
public String selectMbrSrchPopupRForm(ModelMap model, MbrSrchVO mbrSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
mbrSrchVO.setSopmalCd(authSopmalCd);
|
||||
mbrSrchVO.setPopDv("Y");
|
||||
//페이징값 가져오기
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqireForm", mbrSrchVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectMbrSrchPopupRForm(ModelMap model, BOMbrSrchVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
vo.setPopDv("Y");
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
vo.setSrchMbrDvCd(user.getMbrDvCd());
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
/*회원리스트 조회일때만*/
|
||||
if (!"Y".equals(vo.getPopDv())) {
|
||||
//리셀러 여부 o
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("appen", appen);
|
||||
}
|
||||
|
||||
//쇼핑몰 브랜드 검색
|
||||
List<DataMap> sopmal = new ArrayList<>();
|
||||
if ("integ".equals(vo.getReqPageDv())) {
|
||||
sopmal = maSopmalService.selectBOSopmalCdNm();
|
||||
content.put("sopmal", sopmal);
|
||||
}
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("vo", vo);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqireForm", mbrSrchVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/email/EmailMbrSrchPopupRForm";
|
||||
}
|
||||
@@ -181,9 +296,11 @@ public class EmailController {
|
||||
try {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
} catch (WnbtRestException wre){
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다."+ wre.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException("파일 업로드에 실패했습니다."+ e.getMessage());
|
||||
}
|
||||
|
||||
//파일정보 셋팅
|
||||
@@ -218,18 +335,49 @@ public class EmailController {
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertEmailSndng", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> insertEmailSndng(@Validated EmailVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
@RequestMapping(value="/insertEmailSndng", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertEmailSndng(@Validated BOEmailVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/email/insertBOEmailSndng", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//시크릿 키 설정
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
/* TODO 임시 데이터 */
|
||||
//등록자구분 (02:관리자-수동발송, 03:시스템-자동발송)
|
||||
vo.setRegusrDv("02");
|
||||
//상태
|
||||
vo.setSttus("REG");
|
||||
//전송위치(사용 안함)
|
||||
vo.setSndngLc("");
|
||||
//결과코드
|
||||
vo.setRsltCd("");
|
||||
|
||||
//이메일 발송내역 등록
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = boEmailService.insertBOEmailSndng(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/email/insertBOEmailSndng", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -246,28 +394,59 @@ public class EmailController {
|
||||
/**
|
||||
* 이메일 발송 관리 > 이메일 수동 발송 내역 > 리스트 조회
|
||||
* @param model
|
||||
* @param maEmailSrchVO
|
||||
* @param bOMaEmailSrchVO
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectEmailPassivSndngListInqire")
|
||||
public String selectEmailPassivSndngListInqire(ModelMap model, MaEmailSrchVO maEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
maEmailSrchVO.setAtmcAt("N");
|
||||
maEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
public String selectEmailPassivSndngListInqire(ModelMap model, BOMaEmailSrchVO bOMaEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
bOMaEmailSrchVO.setAtmcAt("N");
|
||||
bOMaEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
// BO 이메일 발송 내역 조회 호출
|
||||
try {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
String srchShop = bOMaEmailSrchVO.getSrchShop();
|
||||
if (srchShop == null) {
|
||||
bOMaEmailSrchVO.setSrchShop(MemberJwtContextHolder.getMemberInfo().getSopmalCd());
|
||||
} else if (srchShop.equals("ALL")) {
|
||||
bOMaEmailSrchVO.setSrchShop(null);
|
||||
}
|
||||
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);
|
||||
|
||||
model.addAttribute("emailSrchVO", maEmailSrchVO);
|
||||
//페이징 처리를 위한 값 설정
|
||||
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("resultListMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
|
||||
model.addAttribute("emailSrchVO", bOMaEmailSrchVO);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/email/EmailPassivSndngListInqireR";
|
||||
@@ -282,20 +461,50 @@ public class EmailController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectEmailSndngPopupForm")
|
||||
public String selectEmailSndngPopupForm(ModelMap model, MaEmailSrchVO maEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
maEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
public String selectEmailSndngPopupForm(ModelMap model, BOMaEmailSrchVO bOMaEmailSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
bOMaEmailSrchVO.setSrchShop(authSopmalCd);
|
||||
try {
|
||||
String srchShop = bOMaEmailSrchVO.getSrchShop();
|
||||
if (srchShop == null) {
|
||||
bOMaEmailSrchVO.setSrchShop(MemberJwtContextHolder.getMemberInfo().getSopmalCd());
|
||||
} else if (srchShop.equals("ALL")) {
|
||||
bOMaEmailSrchVO.setSrchShop(null);
|
||||
}
|
||||
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);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
model.addAttribute("emailSrchVO", maEmailSrchVO);
|
||||
//페이징 처리를 위한 값 설정
|
||||
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("resultListMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
model.addAttribute("emailSrchVO", bOMaEmailSrchVO);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/email/EmailSndngPopupC";
|
||||
@@ -306,14 +515,36 @@ public class EmailController {
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateMarktRecptnArgeAt")
|
||||
public ResponseEntity<WnbtResponse> updateMarktRecptnArgeAt(MbrVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setEmailRecptnAt("N");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/email/updateBoMarktRecptnArgeAt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
@RequestMapping(value="/updateMarktRecptnArgeAt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMarktRecptnArgeAt(BOMbrVO mbrVo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
mbrVo.setEmailRecptnAt("N");
|
||||
mbrVo.setSopmalCd(authSopmalCd);
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
mbrVo.setRegusr(user.getUserInnb());
|
||||
mbrVo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
mbrVo.setSopmalCd(user.getSopmalCd());
|
||||
mbrVo.setMainSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
mbrVo.setMarktRecptnAgreAt("N");
|
||||
|
||||
//이메일 발송내역 등록
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
message = mbrService.updateBOMarkRecptnAgreUpdt(mbrVo);
|
||||
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/email/updateBoMarktRecptnArgeAt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
package com.wb.domainserver.domain.mngr.ntcn.lgqymssage.controller;
|
||||
|
||||
import com.nimbusds.jose.shaded.gson.Gson;
|
||||
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.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.lgqymssage.service.BOLgqyMssageService;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.lgqymssage.vo.BOLgqyMssageSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.lgqymssage.vo.BOLgqyMssageVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.lgqymssage.vo.LgqyMssageSrchVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.lgqymssage.vo.LgqyMssageVO;
|
||||
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 com.wb.domainserver.util.file.service.FileStorageService;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -65,6 +78,16 @@ public class LgqyMssageController {
|
||||
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
|
||||
@Autowired
|
||||
private BOLgqyMssageService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
/*****************************************************
|
||||
대량 메시지 발송 관리 START
|
||||
*****************************************************/
|
||||
@@ -87,15 +110,36 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngRegistForm")
|
||||
public String selectMssageLgqySndngRegistForm(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngRegistForm(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngRegistForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
//공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SNDNG_DV"); // 상담처리상태
|
||||
List<?> sndngDvList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
List<DataMap> sopmalList = service.selectBOShopListInqire();
|
||||
|
||||
content.put("sndngDvList", sndngDvList);
|
||||
content.put("sopmalList", sopmalList);
|
||||
content.put("sopmalCd", boLgqyMssageSrchVO.getSrchSopmalCd());
|
||||
DataMap shopInfoMap = service.selectBOShopInfoInqire(boLgqyMssageSrchVO);
|
||||
content.put("shopInfoMap",shopInfoMap);
|
||||
content.put("bgntme", StringUtil.isNullToString(shopInfoMap.get("smsAtmcSndngLmttBgntme")).substring(0, 2));
|
||||
content.put("endtme", StringUtil.isNullToString(shopInfoMap.get("smsAtmcSndngLmttEndtme")).substring(0, 2));
|
||||
content.put("userNm",user.getMbrNm());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngRegistForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqySndngRegistC";
|
||||
}
|
||||
@@ -107,15 +151,34 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngListInqireRForm")
|
||||
public String selectMssageLgqySndngListInqireRForm(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngListInqireRForm(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngListInqireRForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
DataMap content = new DataMap();
|
||||
//공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SNDNG_STTUS2"); // 상담처리상태
|
||||
List<DataMap> sndngSttus = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
//쇼핑몰 코드
|
||||
List<DataMap> sopmalList = service.selectBOShopListInqire();
|
||||
content.put("sopmalList", sopmalList);
|
||||
content.put("sndngSttus", sndngSttus);
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
content.put("sopmalCd", user.getSopmalCd());
|
||||
}
|
||||
|
||||
content.put("sopmalCd", boLgqyMssageSrchVO.getSrchSopmalCd());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngListInqireRForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqyPassivSndngListInqireRForm";
|
||||
}
|
||||
@@ -127,15 +190,42 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngListInqire")
|
||||
public String selectMssageLgqySndngListInqire(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngListInqire(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
|
||||
|
||||
DataMap content = new DataMap();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(boLgqyMssageSrchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(boLgqyMssageSrchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
boLgqyMssageSrchVO.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
boLgqyMssageSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
boLgqyMssageSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
boLgqyMssageSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
//대량 메세지 발송 내역 조회 결과 및 페이징정보 넣기
|
||||
content.put("paginationInfo", boLgqyMssageSrchVO.getPaginationInfo());
|
||||
content.put("boCtrlMap", service.selectBOMssageLgqySndngListInqire(boLgqyMssageSrchVO));
|
||||
content.put("boLgqyMssageSrchVO", boLgqyMssageSrchVO);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqyPassivSndngListInqireR";
|
||||
}
|
||||
@@ -147,15 +237,43 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngUpdtInqire")
|
||||
public String selectMssageLgqySndngUpdtInqire(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngUpdtInqire(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngUpdtInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
boLgqyMssageSrchVO.setRegusr(user.getUserInnb());
|
||||
boLgqyMssageSrchVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
|
||||
//상세 내역 조회
|
||||
content.put("boCtrlMap", service.selectBOMssageLgqySndngDtlInqire(boLgqyMssageSrchVO));
|
||||
|
||||
//발송 대상 조회
|
||||
List<DataMap> boSndngToList = service.selectBOMssageLgqySndngToInqire(boLgqyMssageSrchVO);
|
||||
content.put("boSndngToList", boSndngToList);
|
||||
content.put("sndngToJson", new Gson().toJson(boSndngToList));
|
||||
|
||||
//발송요청현황 확인
|
||||
content.put("sndgReqList", service.selectBOMssageLgqySndngReqInqire(boLgqyMssageSrchVO));
|
||||
|
||||
//쇼핑몰 코드
|
||||
List<DataMap> sopmalList = service.selectBOShopListInqire();
|
||||
|
||||
content.put("sopmalList", sopmalList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngUpdtInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqySndngUpdtR";
|
||||
}
|
||||
@@ -167,15 +285,33 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngStats")
|
||||
public String selectMssageLgqySndngStats(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngStats(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngStats", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
//상세 내역 조회
|
||||
content.put("boCtrlMap", service.selectBOMssageLgqySndngDtlInqire(boLgqyMssageSrchVO));
|
||||
//클릭 수 통계
|
||||
content.put("clickStat", service.selectBOMssageLgqyClickStat(boLgqyMssageSrchVO));
|
||||
//url 별 클릭 수 통계
|
||||
content.put("urlClickStat", service.selectBOMssageLgqyUrlClickStat(boLgqyMssageSrchVO));
|
||||
//시간대별 클릭 통계 목록
|
||||
content.put("clickList", service.selectBOMssageLgqyClickStatList(boLgqyMssageSrchVO));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngStats", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqySndngStatsR";
|
||||
}
|
||||
@@ -187,15 +323,26 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngClickBirth")
|
||||
public String selectMssageLgqySndngClickBirth(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngClickBirth(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngClickBirth", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
//상세 내역 조회
|
||||
content.put("clickBirthList", service.selectBOMssageLgqySndngBirthStat(boLgqyMssageSrchVO));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngClickBirth", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqySndngClickBirthR";
|
||||
}
|
||||
@@ -207,15 +354,25 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngClickOrdr")
|
||||
public String selectMssageLgqySndngClickOrdr(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngClickOrdr(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngClickOrdr", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
//상세 내역 조회
|
||||
content.put("boCtrlMap", service.selectBOMssageLgqySndngOrdrStat(boLgqyMssageSrchVO));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngClickOrdr", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqySndngClickOrdrR";
|
||||
}
|
||||
@@ -227,15 +384,26 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngReqstCldr")
|
||||
public String selectMssageLgqySndngReqstCldr(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageLgqySndngReqstCldr(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngReqstCldr", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message.put("sndngReqstCldr",service.selectBOMssageLgqySndngReqstCldr(boLgqyMssageSrchVO));
|
||||
|
||||
model.addAttribute("resultMap", message);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngReqstCldr", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/lgqymssage/MssageLgqySndngReqstCldrPopupR";
|
||||
}
|
||||
@@ -246,15 +414,31 @@ public class LgqyMssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageLgqySndngReqstDtInqire")
|
||||
public ResponseEntity<WnbtResponse> selectMssageLgqySndngReqstDtInqire(LgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@RequestMapping(value = "/selectMssageLgqySndngReqstDtInqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectMssageLgqySndngReqstDtInqire(BOLgqyMssageSrchVO boLgqyMssageSrchVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSrchSopmalCd(authSopmalCd);
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngReqstDtInqire", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boLgqyMssageSrchVO.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
|
||||
message = service.selectBOMssageLgqySndngReqstDtInqire(boLgqyMssageSrchVO);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/selectBOMssageLgqySndngReqstDtInqire", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
|
||||
}
|
||||
|
||||
@@ -265,8 +449,8 @@ public class LgqyMssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertMssageLgqySndngRegist")
|
||||
public ResponseEntity<WnbtResponse> insertMssageLgqySndngRegist(@Validated LgqyMssageVO vo, BindingResult bindingResult
|
||||
@RequestMapping(value = "/insertMssageLgqySndngRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertMssageLgqySndngRegist(@Validated BOLgqyMssageVO vo, BindingResult bindingResult
|
||||
, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
@@ -286,10 +470,27 @@ public class LgqyMssageController {
|
||||
vo.setLgqyMssageToList(null);
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/insertBOMssageLgqySndngRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//대량 메시지 발송내역, 발송대상 등록
|
||||
DataMap message = service.insertBOMssageLgqySndngRegist(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/insertBOMssageLgqySndngRegist", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -298,8 +499,8 @@ public class LgqyMssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateMssageLgqySndngUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateMssageLgqySndngUpdt(@Validated LgqyMssageVO vo, BindingResult bindingResult, HttpServletRequest request
|
||||
@RequestMapping(value = "/updateMssageLgqySndngUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMssageLgqySndngUpdt(@Validated BOLgqyMssageVO vo, BindingResult bindingResult, HttpServletRequest request
|
||||
, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
if (bindingResult.hasErrors()) {
|
||||
@@ -318,22 +519,60 @@ public class LgqyMssageController {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/updateBOMssageLgqySndngUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
|
||||
//대량 메시지 설정 수정
|
||||
String updtAt = service.selectBOMssageLgqySndngUpdtAt(vo);
|
||||
if ("Y".equals(updtAt)) {
|
||||
message = service.updateBOMssageLgqySndngUpdt(vo);
|
||||
} else {
|
||||
message.put("result", "ing");
|
||||
}
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/updateBOMssageLgqySndngUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 발신 상태 취소 및 활성화 o
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/updateMssageLgqySndngSttusUpdt")
|
||||
public ResponseEntity<?> updateBOMssageLgqySndngSttusUpdt(LgqyMssageVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/updateBOMssageLgqySndngSttusUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
@RequestMapping(value = "/updateMssageLgqySndngSttusUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateBOMssageLgqySndngSttusUpdt(BOLgqyMssageVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
DataMap content = new DataMap();
|
||||
vo.setUpdateAt("N");
|
||||
String updateAt = service.selectBOMssageLgqySndngUpdtAt(vo);
|
||||
if ("Y".equals(updateAt)) {
|
||||
content = service.updateBOMssageLgqySndngSttusUpdt(vo);
|
||||
} else {
|
||||
content.put("result", "ing");
|
||||
}
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/lgqymssage/updateBOMssageLgqySndngSttusUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
/*****************************************************
|
||||
대량 메시지 발송 관리 END
|
||||
@@ -363,15 +602,36 @@ public class LgqyMssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageStlListInqire")
|
||||
public String selectMssageStlListInqire(LgqyMssageVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
public String selectMssageStlListInqire(BOLgqyMssageSrchVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if ("01".equals(user.getSysDvCd())) {
|
||||
vo.setSrchSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssageStlListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = 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());
|
||||
|
||||
//상세 내역 조회
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssageStlListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssageStlListInqireR";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
package com.wb.domainserver.domain.mngr.ntcn.mssage.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.ntcn.mssage.vo.BOMaMssageSrchVO;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOItrntMssageFileVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageAlbumVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageSrchVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.vo.BOMssageVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.service.BOOrdrMngrService;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.vo.BOSetupOrdrVO;
|
||||
import com.wb.domainserver.domain.mngr.mbr.vo.MbrSrchVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.ItrntMssageFileVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.MssageAlbumVO;
|
||||
@@ -8,19 +23,25 @@ import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.MssageSrchVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.mssage.vo.MssageVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.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.file.service.FileStorageService;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
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.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -28,9 +49,11 @@ import org.springframework.validation.BindingResult;
|
||||
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.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* SMS Controller
|
||||
@@ -74,6 +97,21 @@ public class MssageController {
|
||||
@Autowired
|
||||
private FileStorageService filestore;
|
||||
|
||||
@Autowired
|
||||
private BOMssageService service;
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
@Autowired
|
||||
private BOOrdrMngrService boOrdrMngrService;
|
||||
|
||||
|
||||
|
||||
/*****************************************************
|
||||
수동 메시지 발송 관리 START
|
||||
*****************************************************/
|
||||
@@ -99,16 +137,27 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMssagePassivSndng")
|
||||
public String selectMssagePassivSndng(MssageVO vo, ModelMap model,
|
||||
public String selectMssagePassivSndng(BOMssageVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssagePassivSndng", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("shopInfoMap", service.selectBOShopInfoInqire(vo));
|
||||
content.put("sopmalCd", user.getSopmalCd());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssagePassivSndng", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "mngr/ntcn/mssage/MssagePassivSndngC";
|
||||
}
|
||||
|
||||
@@ -118,16 +167,26 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMssageSndngPopupForm")
|
||||
public String selectMssageSndngPopupForm(MssageVO vo, ModelMap model,
|
||||
public String selectMssageSndngPopupForm(BOMssageVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssageSndngPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
DataMap content = new DataMap();
|
||||
content.put("shopInfoMap", service.selectBOShopInfoInqire(vo));
|
||||
content.put("sopmalCd", user.getSopmalCd());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssageSndngPopupForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssageSndngPopupC";
|
||||
}
|
||||
@@ -139,16 +198,43 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMssagePassivSndngListInqireRForm")
|
||||
public String selectMessagePassivSndngListInqireRForm(MssageSrchVO vo, ModelMap model,
|
||||
public String selectMessagePassivSndngListInqireRForm(BOMssageSrchVO bOMssageSrchVO, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
bOMssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
bOMssageSrchVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngDtlsListInqireForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
//브랜드코드
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("BRAND");
|
||||
List<DataMap> brand = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//메시지 종류
|
||||
bOMaComncdVO.setGroupCd("DV");
|
||||
List<DataMap> dv = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//발송상태
|
||||
bOMaComncdVO.setGroupCd("STTUS");
|
||||
List<DataMap> sttus = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
//검색 폼 code
|
||||
resultMap.put("brand",maSopmalService.selectBOSopmalCdNm());
|
||||
resultMap.put("dv",dv);
|
||||
resultMap.put("sttus",sttus);
|
||||
resultMap.put("bOMssageSrchVO",bOMssageSrchVO);
|
||||
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngDtlsListInqireForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssagePassivSndngListInqireRForm";
|
||||
}
|
||||
@@ -159,22 +245,51 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMssagePassivSndngListInqire")
|
||||
public String selectMessagePassivSndngListInqire(MssageSrchVO vo, ModelMap model,
|
||||
public String selectMessagePassivSndngListInqire(BOMssageSrchVO bOMssageSrchVO, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
if(vo.getSrchDv() == null) {
|
||||
if(bOMssageSrchVO.getSrchDv() == null) {
|
||||
List<String> srchDvList = new ArrayList<>();
|
||||
srchDvList.add("SMS");
|
||||
srchDvList.add("LMS");
|
||||
vo.setSrchDv(srchDvList);
|
||||
bOMssageSrchVO.setSrchDv(srchDvList);
|
||||
}
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
bOMssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
bOMssageSrchVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(bOMssageSrchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(bOMssageSrchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
bOMssageSrchVO.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
bOMssageSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
bOMssageSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
bOMssageSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//암호화 키
|
||||
bOMssageSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||
|
||||
//메시지 발송 목록 조회 결과 및 페이징정보 넣기
|
||||
content.put("paginationInfo", bOMssageSrchVO.getPaginationInfo());
|
||||
content.put("boCtrlMap", service.selectBOSmsSndngListInqire(bOMssageSrchVO));
|
||||
content.put("bOMssageSrchVO", bOMssageSrchVO);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssagePassivSndngListInqireR";
|
||||
}
|
||||
@@ -185,16 +300,26 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMssagePassivSndngDtlPopupInqire")
|
||||
public String selectMssagePassivSndngDtlPopupInqire(MssageSrchVO vo, ModelMap model,
|
||||
public String selectMssagePassivSndngDtlPopupInqire(BOMssageSrchVO bOMssageSrchVO, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
bOMssageSrchVO.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
bOMssageSrchVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngDtlInfo", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
bOMssageSrchVO.setSecretKey(boCommonService.selectSecretkey());
|
||||
content.put("boCtrlMap", service.selectBOSmsSndngDtlInfo(bOMssageSrchVO));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOSmsSndngDtlInfo", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssagePassivSndngDtlPopupR";
|
||||
}
|
||||
@@ -204,8 +329,8 @@ public class MssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertMssageSndng")
|
||||
public ResponseEntity<WnbtResponse> insertMssageSndng(MssageVO vo, BindingResult bindingResult,
|
||||
@RequestMapping(value="/insertMssageSndng", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertMssageSndng(BOMssageVO vo, BindingResult bindingResult,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
@@ -214,21 +339,77 @@ public class MssageController {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
// 응담객체에 메시지와 함께 반환결과 처리
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/insertBOMssageSndng", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
|
||||
DataMap message = new DataMap();
|
||||
//메세지 발송 등록, 발송 대상 등록
|
||||
DataMap mssageRslt = service.insertBOMssageSndng(vo);
|
||||
message.put("messageRslt", mssageRslt);
|
||||
|
||||
DataMap paramMap = new DataMap();
|
||||
paramMap.put("srchSmsInnb", vo.getSmsInnb());
|
||||
|
||||
|
||||
List<String> srchSttusList = new ArrayList<String>();
|
||||
srchSttusList.add("REG");
|
||||
paramMap.put("srchSttus", srchSttusList);
|
||||
/**
|
||||
* 뉴트리코어(NC), 참다한(CH) 인 경우 슈어, 그외 롯데
|
||||
* TODO: 추후에 구분 처리
|
||||
*/
|
||||
|
||||
DataMap messageSureInsert = new DataMap();
|
||||
DataMap cntResult = new DataMap();
|
||||
DataMap syncResult = new DataMap();
|
||||
DataMap messageLotteInsert = new DataMap();
|
||||
//if(vo.getSopmalCd().equals("NC") || vo.getSopmalCd().equals("CH")) {
|
||||
//슈어엠테이블 등록
|
||||
messageSureInsert = service.insertBOMssageSureReigst(paramMap);
|
||||
message.put("messageSureInsert", messageSureInsert);
|
||||
//대상 수 재설정
|
||||
cntResult = service.updateBOMssageSureCnt(paramMap);
|
||||
|
||||
//싱크
|
||||
syncResult = service.updateBOMssageSync(paramMap);
|
||||
|
||||
//슈어 등록
|
||||
message.put("messageSureInsert", messageSureInsert);
|
||||
|
||||
//롯데 등록
|
||||
message.put("messageLotteInsert", messageLotteInsert);
|
||||
|
||||
//대상 수 설정`
|
||||
message.put("messageCnt", cntResult);
|
||||
//슈어 싱크
|
||||
message.put("messageSync", syncResult);
|
||||
log.info("syncResult {}", syncResult);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/insertBOMssageSndng", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* SMS 발송 예약 취소
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/mssageSndngCancel")
|
||||
public ResponseEntity<WnbtResponse> mssageSndngCancel(MssageVO vo, BindingResult bindingResult,
|
||||
@RequestMapping(value="/mssageSndngCancel", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> mssageSndngCancel(BOMssageVO vo, BindingResult bindingResult,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
log.info("MssageVOAAAAAAAA");
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
if(bindingResult.hasErrors()){
|
||||
@@ -237,11 +418,27 @@ public class MssageController {
|
||||
|
||||
log.info("MssageVO : {}",vo);
|
||||
|
||||
// 응담객체에 메시지와 함께 반환결과 처리
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/mssageSndngCancel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//메세지 발송 취소
|
||||
DataMap message = service.mssageSndngCancel(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/mssageSndngCancel", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
@@ -259,16 +456,32 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMssagePassivSndngImgPopupForm")
|
||||
public String selectMssagePassivSndngImgPopupForm(ItrntMssageFileVO vo, ModelMap model,
|
||||
public String selectMssagePassivSndngImgPopupForm(BOItrntMssageFileVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssagePassivSndngImgPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
|
||||
//
|
||||
vo.setProviderSeq(BigInteger.ZERO);
|
||||
//목록
|
||||
content.put("sopmalCd", vo.getSopmalCd());
|
||||
content.put("itrntFileList", service.selectBOMssagePassivSndngImgPopupForm(vo));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssagePassivSndngImgPopupForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssagePassivSndngImgPopupC";
|
||||
}
|
||||
@@ -280,8 +493,8 @@ public class MssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertIntrntSndngImg")
|
||||
public ResponseEntity<WnbtResponse> insertIntrntSndngImg(ItrntMssageFileVO vo, ModelMap model,
|
||||
@RequestMapping(value="/insertIntrntSndngImg", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertIntrntSndngImg(BOItrntMssageFileVO vo, ModelMap model,
|
||||
HttpServletRequest request,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
@@ -297,34 +510,54 @@ public class MssageController {
|
||||
ulpladFileMap = filestore.fileUpload(request);
|
||||
vo.setFileInfo(ulpladFileMap);
|
||||
} catch (WnbtRestException wre){
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw new WnbtRestException("파일 업로드에 실패하였습니다.");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException("파일 업로드에 실패하였습니다.");
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/insertBOIntrntSndngImg", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
//상세 내역 조회
|
||||
message = service.insertBOIntrntSndngImg(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/insertBOIntrntSndngImg", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 인트라넷 이미지 삭제
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteIntrntSndngImg")
|
||||
public ResponseEntity<WnbtResponse> deleteIntrntSndngImg(ItrntMssageFileVO vo, ModelMap model,
|
||||
HttpServletRequest request,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/deleteBOIntrntSndngImg", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
}
|
||||
// @Policy(AuthPolicy.RESTRICTED)
|
||||
// @RequestMapping(value="/deleteIntrntSndngImg", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
// public ResponseEntity<WnbtResponse> deleteIntrntSndngImg(ItrntMssageFileVO vo, ModelMap model,
|
||||
// HttpServletRequest request,
|
||||
// @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
//
|
||||
// vo.setSopmalCd(authSopmalCd);
|
||||
//
|
||||
//
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/deleteBOIntrntSndngImg", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
// }
|
||||
|
||||
|
||||
/*****************************************************
|
||||
@@ -337,16 +570,28 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectRegistMssagePopup")
|
||||
public String selectRegistMssagePopup(MssageAlbumVO vo, ModelMap model,
|
||||
public String selectRegistMssagePopup(BOMssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBORegistMssagePopup", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
|
||||
content.put("boCtrlMap", service.selectBORegistMssagePopup(vo));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBORegistMssagePopup", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/RegistMssagePopupR";
|
||||
}
|
||||
@@ -358,16 +603,25 @@ public class MssageController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMssageAditPopupForm")
|
||||
public String selectMssageAditPopupForm(MssageVO vo, ModelMap model,
|
||||
public String selectMssageAditPopupForm(BOMssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssageAditPopupForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
content.put("boAlbumMap", service.selectBOMssageAditPopupForm(vo));
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMssageAditPopupForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssageAditPopupC";
|
||||
}
|
||||
@@ -377,16 +631,31 @@ public class MssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/insertMssageAditRegist")
|
||||
public ResponseEntity<?> insertMssageAditRegist(MssageAlbumVO vo, ModelMap model,
|
||||
@RequestMapping(value="/insertMssageAditRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> insertMssageAditRegist(BOMssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/insertBOMssageAditRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message = service.insertBOMssageAditRegist(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/insertBOMssageAditRegist", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
@@ -395,16 +664,32 @@ public class MssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateMssageAditUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateMssageAditUpdt(MssageAlbumVO vo, ModelMap model,
|
||||
@RequestMapping(value="/updateMssageAditUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMssageAditUpdt(BOMssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/updateBOMssageAditUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message = service.updateBOMssageAditUpdt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/updateBOMssageAditUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -412,14 +697,30 @@ public class MssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteMssageAdit")
|
||||
public ResponseEntity<WnbtResponse> deleteMssageAdit(MssageAlbumVO vo, ModelMap model,
|
||||
@RequestMapping(value="/deleteMssageAdit", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteMssageAdit(BOMssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/deleteBOMssageAdit", vo),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = service.deleteBOMssageAdit(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/deleteBOMssageAdit", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
@@ -428,16 +729,32 @@ public class MssageController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/deleteMssageAditCtgy")
|
||||
public ResponseEntity<WnbtResponse> deleteMssageAditCtgy(MssageAlbumVO vo, ModelMap model,
|
||||
@RequestMapping(value="/deleteMssageAditCtgy", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteMssageAditCtgy(BOMssageAlbumVO vo, ModelMap model,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/deleteBOMssageAditCtgy", vo),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap message = new DataMap();
|
||||
message = service.deleteBOMssageAditCtgy(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/deleteBOMssageAditCtgy", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
@@ -453,37 +770,99 @@ public class MssageController {
|
||||
* 고객센터/무료수신거부 조회
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectShopNb")
|
||||
public ResponseEntity<?> selectShopNb(MssageVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
@RequestMapping(value = "/selectShopNb", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> selectShopNb(BOMssageVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
if(StringUtil.isEmpty(vo.getSopmalCd())){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOShopNb", vo),
|
||||
ReplyFromResrc::getReply
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("shopNbMap", service.selectBOShopNb(vo));
|
||||
content.put("sopmalCd", vo.getSopmalCd());
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOShopNb", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 회원 팝업 폼
|
||||
* @param mbrSrchVO
|
||||
* @param boMbrSrchVO
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectMbrSrchPopupRForm")
|
||||
public String selectMbrSrchPopupRForm(ModelMap model, MbrSrchVO mbrSrchVO,
|
||||
public String selectMbrSrchPopupRForm(ModelMap model, BOMbrSrchVO boMbrSrchVO,
|
||||
@CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
mbrSrchVO.setSopmalCd(authSopmalCd);
|
||||
boMbrSrchVO.setSopmalCd(authSopmalCd);
|
||||
|
||||
mbrSrchVO.setPopDv("Y");
|
||||
//페이징값 가져오기
|
||||
boMbrSrchVO.setPopDv("Y");
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMbrListInqireForm", mbrSrchVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boMbrSrchVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(boMbrSrchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(boMbrSrchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
boMbrSrchVO.setPaginationInfo(paginationInfo);
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
boMbrSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
boMbrSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
boMbrSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
/*회원리스트 조회일때만*/
|
||||
if(!"Y".equals(boMbrSrchVO.getPopDv())){
|
||||
//리셀러 여부 o
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("RSLR_APPN_DV");
|
||||
List<?> appen = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
content.put("appen", appen);
|
||||
}
|
||||
|
||||
//쇼핑몰 브랜드 검색
|
||||
List<DataMap> sopmal = new ArrayList<>();
|
||||
if("integ".equals(boMbrSrchVO.getReqPageDv())){
|
||||
sopmal = maSopmalService.selectBOSopmalCdNm();
|
||||
content.put("sopmal",sopmal);
|
||||
}
|
||||
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(boMbrSrchVO.getSopmalCd());
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
|
||||
content.put("paginationInfo", boMbrSrchVO.getPaginationInfo());
|
||||
content.put("boMbrSrchVO", boMbrSrchVO);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/mssage/selectBOMbrListInqireForm", mbrSrchVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "mngr/ntcn/mssage/MssageMbrSrchPopupRForm";
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.wb.domainserver.domain.mngr.ntcn.tmplt.controller;
|
||||
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.tmplt.service.BOTmpltService;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.tmplt.vo.BOTmpltVO;
|
||||
import com.wb.domainserver.domain.mngr.ntcn.tmplt.vo.TmpltVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.exception.code.ErrorCode;
|
||||
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 +19,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 +29,9 @@ import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* 템플릿 관리 Controller
|
||||
* @author 리브가
|
||||
@@ -54,6 +64,8 @@ public class TmpltController {
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
@Autowired
|
||||
private BOTmpltService service;
|
||||
|
||||
/**
|
||||
* 템플릿 관리 페이지
|
||||
@@ -68,26 +80,48 @@ public class TmpltController {
|
||||
/**
|
||||
* 템플릿 관리 > 이메일 템플릿 폼
|
||||
* @param model
|
||||
* @param tmpltVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectEmailAtmcSndngTmplatOneInqireForm")
|
||||
public String selectEmailAtmcSndngTmplatOneInqireForm(ModelMap model, TmpltVO tmpltVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
public String selectEmailAtmcSndngTmplatOneInqireForm(ModelMap model, BOTmpltVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
try {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
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("formDvCd", 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, "/gcone/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
|
||||
model.addAttribute("tmpltVO",vo);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/tmplt/EmailAtmcSndngTmplatU";
|
||||
@@ -99,58 +133,122 @@ public class TmpltController {
|
||||
* @author 이대환
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value="/selectEmailAtmcSndngTmplatOne")
|
||||
public ResponseEntity<WnbtResponse> selectEmailAtmcSndngTmplatOne(TmpltVO tmpltVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
||||
ReplyFromResrc::getReply
|
||||
@RequestMapping(value="/selectEmailAtmcSndngTmplatOne", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectEmailAtmcSndngTmplatOne(BOTmpltVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
//사용자 정보 추출 및 적용
|
||||
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("formDvCd", 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, "/gcone/ntcn/tmplt/selectBOEmailAtmcSndngTmplatOneInqireForm", tmpltVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 템플릿 관리 > 이메일 템플릿 - 이메일 템플릿 수정
|
||||
* @param tmpltVO
|
||||
* @param vo
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateEmailAtmcSndngTmplatUpdt", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateEmailAtmcSndngTmplatUpdt(TmpltVO tmpltVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
@RequestMapping(value = "/updateEmailAtmcSndngTmplatUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateEmailAtmcSndngTmplatUpdt(BOTmpltVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/updateBOEmailAtmcSndngTmplatUpdt", tmpltVO),
|
||||
ReplyFromResrc::getReply
|
||||
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, "/gcone/ntcn/tmplt/updateBOEmailAtmcSndngTmplatUpdt", tmpltVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 템플릿 관리 > SMS 템플릿 폼
|
||||
* @param model
|
||||
* @param tmpltVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectMssageAtmcSndngTmplatInqireForm")
|
||||
public String selectMssageAtmcSndngTmplatInqireForm(ModelMap model, TmpltVO tmpltVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
public String selectMssageAtmcSndngTmplatInqireForm(ModelMap model, BOTmpltVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
try {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/selectBOMssageAtmcSndngTmplatInqireForm", tmpltVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
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("formDvCd", 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, "/gcone/ntcn/tmplt/selectBOMssageAtmcSndngTmplatInqireForm", tmpltVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
|
||||
model.addAttribute("tmpltVO",vo);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/tmplt/MssageAtmcSndngTmplatU";
|
||||
@@ -158,47 +256,82 @@ public class TmpltController {
|
||||
|
||||
/**
|
||||
* 템플릿 관리 > SMS 템플릿 - SMS 템플릿 수정
|
||||
* @param tmpltVO
|
||||
* @param boTmpltVO
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateMssageAtmcSndngTmplatUpdt", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateMssageAtmcSndngTmplatUpdt(TmpltVO tmpltVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
@RequestMapping(value = "/updateMssageAtmcSndngTmplatUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMssageAtmcSndngTmplatUpdt(BOTmpltVO boTmpltVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
boTmpltVO.setSopmalCd(authSopmalCd);
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/updateBOMssageAtmcSndngTmplatUpdt", tmpltVO),
|
||||
ReplyFromResrc::getReply
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
boTmpltVO.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
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, "/gcone/ntcn/tmplt/updateBOMssageAtmcSndngTmplatUpdt", tmpltVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 템플릿 관리 > 알림톡 템플릿 폼
|
||||
* @param model
|
||||
* @param tmpltVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectNtcntalkAtmcSndngTmplatInqireForm")
|
||||
public String selectNtcntalkAtmcSndngTmplatInqireForm(ModelMap model, TmpltVO tmpltVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
public String selectNtcntalkAtmcSndngTmplatInqireForm(ModelMap model, BOTmpltVO vo, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
try {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatInqireForm", tmpltVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
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("groupCd", service.selectBOTmplatGroupCd("FORM_DV"));
|
||||
content.put("formDvCd", 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, "/gcone/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatInqireForm", tmpltVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
|
||||
model.addAttribute("tmpltVO",vo);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/tmplt/NtcntalkAtmcSndngTmplatU";
|
||||
@@ -207,27 +340,42 @@ public class TmpltController {
|
||||
/**
|
||||
* 템플릿 관리 > 알림톡 템플릿 > 알림톡 탬플릿 수정 팝업 폼
|
||||
* @param model
|
||||
* @param tmpltVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectNtcntalkAtmcSndngTmplatUpdtPopupForm")
|
||||
public String selectNtcntalkAtmcSndngTmplatUpdtPopupForm(TmpltVO tmpltVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
public String selectNtcntalkAtmcSndngTmplatUpdtPopupForm(BOTmpltVO vo, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
try {
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatUpdtPopupForm", tmpltVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
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, "/gcone/ntcn/tmplt/selectBONtcntalkAtmcSndngTmplatUpdtPopupForm", tmpltVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
model.addAttribute("tmpltVO",vo);
|
||||
} catch (WnbtRestException wre){
|
||||
throw new WnbtRestException(wre.getMessage());
|
||||
log.error(wre.getMessage(), wre);
|
||||
throw wre;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return "mngr/ntcn/tmplt/NtcntalkAtmcSndngTmplatUpdtPopupU";
|
||||
@@ -235,22 +383,79 @@ public class TmpltController {
|
||||
|
||||
/**
|
||||
* 템플릿 관리 > 알림톡 템플릿 - 알림톡 템플릿 수정
|
||||
* @param tmpltVO
|
||||
* @param vo
|
||||
* @param bindingResult 바인딩 및 정합성 점검결과 객체
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateNtcntalkAtmcSndngTmplatUpdt", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateNtcntalkAtmcSndngTmplatUpdt(@Validated TmpltVO tmpltVO, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
tmpltVO.setSopmalCd(authSopmalCd);
|
||||
@RequestMapping(value = "/updateNtcntalkAtmcSndngTmplatUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateNtcntalkAtmcSndngTmplatUpdt(@Validated BOTmpltVO vo, BindingResult bindingResult, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||
vo.setSopmalCd(authSopmalCd);
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ntcn/tmplt/updateBONtcntalkAtmcSndngTmplatUpdt", tmpltVO),
|
||||
ReplyFromResrc::getReply
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}
|
||||
|
||||
//알림톡 템플릿 버튼 정제
|
||||
if(vo.getBtnType() != null){
|
||||
for(int i = 0; i < vo.getBtnType().size(); i++){
|
||||
if("DS".equals(vo.getBtnType().get(i))) {
|
||||
vo.getBtnNm().set(i, "");
|
||||
vo.getBtnMUrl().set(i, "");
|
||||
vo.getBtnPcUrl().set(i, "");
|
||||
}
|
||||
}
|
||||
|
||||
switch (vo.getBtnType().size()){
|
||||
case 5:
|
||||
vo.setBtnType05(vo.getBtnType().get(4));
|
||||
vo.setBtnNm05(vo.getBtnNm().get(4));
|
||||
vo.setBtn05Url01(vo.getBtnMUrl().get(4));
|
||||
vo.setBtn05Url02(vo.getBtnPcUrl().get(4));
|
||||
case 4:
|
||||
vo.setBtnType04(vo.getBtnType().get(3));
|
||||
vo.setBtnNm04(vo.getBtnNm().get(3));
|
||||
vo.setBtn04Url01(vo.getBtnMUrl().get(3));
|
||||
vo.setBtn04Url02(vo.getBtnPcUrl().get(3));
|
||||
case 3:
|
||||
vo.setBtnType03(vo.getBtnType().get(2));
|
||||
vo.setBtnNm03(vo.getBtnNm().get(2));
|
||||
vo.setBtn03Url01(vo.getBtnMUrl().get(2));
|
||||
vo.setBtn03Url02(vo.getBtnPcUrl().get(2));
|
||||
case 2:
|
||||
vo.setBtnType02(vo.getBtnType().get(1));
|
||||
vo.setBtnNm02(vo.getBtnNm().get(1));
|
||||
vo.setBtn02Url01(vo.getBtnMUrl().get(1));
|
||||
vo.setBtn02Url02(vo.getBtnPcUrl().get(1));
|
||||
case 1:
|
||||
vo.setBtnType01(vo.getBtnType().get(0));
|
||||
vo.setBtnNm01(vo.getBtnNm().get(0));
|
||||
vo.setBtn01Url01(vo.getBtnMUrl().get(0));
|
||||
vo.setBtn01Url02(vo.getBtnPcUrl().get(0));
|
||||
}
|
||||
}
|
||||
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, "/gcone/ntcn/tmplt/updateBONtcntalkAtmcSndngTmplatUpdt", tmpltVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user