fo bo 머지작업(admin)
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
package com.wb.domainserver.domain.admin.sys.authgrp.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.sys.authgrp.service.BOMaAuthgrpService;
|
||||
import com.wb.domainserver.domain.admin.sys.authgrp.vo.BOMaAuthgrpVO;
|
||||
import com.wb.domainserver.domain.admin.sys.authgrp.vo.MaAuthgrpVO;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.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;
|
||||
@@ -18,6 +25,7 @@ import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||
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;
|
||||
@@ -53,9 +61,6 @@ import java.util.*;
|
||||
@RequestMapping("/admin/sys/authgrp")
|
||||
public class MaAuthgrpController {
|
||||
|
||||
@Autowired
|
||||
private BOMaAuthgrpService service;
|
||||
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
@@ -66,19 +71,58 @@ public class MaAuthgrpController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMaAuthgrpService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService boMaComncdService;
|
||||
/**
|
||||
* 권한그룹 목록 화면
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthGrpListInqireForm")
|
||||
public String selectAuthGrpListInqireForm(MaAuthgrpVO vo, ModelMap model) {
|
||||
public String selectAuthGrpListInqireForm(BOMaAuthgrpVO vo, ModelMap model) {
|
||||
DataMap content = new DataMap();
|
||||
// 페이징
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqireForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SYS_DV"); // 시스템구분(SYS_DV)
|
||||
List<?> sysDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
List<DataMap> srchList = new ArrayList<>();
|
||||
DataMap srchData = new DataMap();
|
||||
srchData.put("srchAuthorNm", vo.getSrchAuthorNm());
|
||||
srchData.put("srchSysDvCd", vo.getSrchSysDvCd());
|
||||
srchData.put("pageUnit", vo.getPageUnit());
|
||||
srchData.put("pageIndex", vo.getPageIndex());
|
||||
srchData.put("pageDv", vo.getPageDv());
|
||||
srchList.add(srchData);
|
||||
|
||||
content.put("paramVO", vo);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
content.put("sysDvList", sysDvList);
|
||||
content.put("srchList", srchList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqireForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/authgrp/maAuthGrpListInqireForm";
|
||||
}
|
||||
@@ -89,13 +133,33 @@ public class MaAuthgrpController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthGrpListInqire")
|
||||
public String selectAuthGrpListInqire(MaAuthgrpVO vo, ModelMap model) {
|
||||
public String selectAuthGrpListInqire(BOMaAuthgrpVO vo, ModelMap model) {
|
||||
DataMap content = new DataMap();
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
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("paramVO", vo);
|
||||
|
||||
List<DataMap> authGrlList = new ArrayList<>();
|
||||
authGrlList = service.selectBOAuthGrpList(vo);
|
||||
content.put("resultList", authGrlList);
|
||||
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/authgrp/maAuthGrpListInqireR";
|
||||
}
|
||||
@@ -106,13 +170,33 @@ public class MaAuthgrpController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthGrpRegistForm")
|
||||
public String selectAuthGrpRegistForm(MaAuthgrpVO vo, ModelMap model) {
|
||||
public String selectAuthGrpRegistForm(BOMaAuthgrpVO vo, ModelMap model) {
|
||||
DataMap content = new DataMap();
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpRegistForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
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("paramVO", vo);
|
||||
|
||||
List<DataMap> authGrlList = new ArrayList<>();
|
||||
authGrlList = service.selectBOAuthGrpList(vo);
|
||||
content.put("resultList", authGrlList);
|
||||
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpRegistForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/authgrp/maAuthGrpC";
|
||||
}
|
||||
@@ -122,16 +206,27 @@ public class MaAuthgrpController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertAuthGrpRegist")
|
||||
public ResponseEntity<WnbtResponse> insertAuthGrpRegist(@Validated MaAuthgrpVO vo, BindingResult bindingResult){
|
||||
|
||||
@RequestMapping(value = "/insertAuthGrpRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertAuthGrpRegist(@Validated BOMaAuthgrpVO vo, BindingResult bindingResult){
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/insertBOAuthGrpRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content = service.insertAuthGrp(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/insertBOAuthGrpRegist", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
/**
|
||||
* 권한그룹 수정 화면이동
|
||||
@@ -139,13 +234,45 @@ public class MaAuthgrpController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthGrpUpdtForm")
|
||||
public String selectAuthGrpUpdtForm(MaAuthgrpVO vo, ModelMap model) {
|
||||
public String selectAuthGrpUpdtForm(BOMaAuthgrpVO vo, ModelMap model) {
|
||||
DataMap content = new DataMap();
|
||||
List<DataMap> authGrlList = new ArrayList<>();
|
||||
DataMap authGrlMap = new DataMap();
|
||||
authGrlMap = service.selectBOAuthGrpUpdtForm(vo);
|
||||
authGrlList.add(authGrlMap);
|
||||
content.put("mbrGradList", authGrlList);
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpUpdtForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
DataMap codeMap = new DataMap();
|
||||
codeMap = service.selectBOFnctCode();
|
||||
codeList.add(codeMap);
|
||||
content.put("codeList", codeList);
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SYS_DV"); // 시스템구분(SYS_DV)
|
||||
List<?> sysDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
bOMaComncdVO.setGroupCd("FNCT_DV"); // 기능구분(FNCT_DV)
|
||||
List<?> fnctDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
List<DataMap> srchList = new ArrayList<>();
|
||||
DataMap srchData = new DataMap();
|
||||
srchData.put("srchAuthorNm", vo.getSrchAuthorNm());
|
||||
srchData.put("srchSysDvCd", vo.getSrchSysDvCd());
|
||||
srchData.put("pageUnit", vo.getPageUnit());
|
||||
srchData.put("pageIndex", vo.getPageIndex());
|
||||
srchData.put("pageDv", vo.getPageDv());
|
||||
srchList.add(srchData);
|
||||
content.put("srchList", srchList);
|
||||
content.put("sysDvList", sysDvList);
|
||||
content.put("fnctDvList", fnctDvList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpUpdtForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "admin/sys/authgrp/maAuthGrpU";
|
||||
}
|
||||
|
||||
@@ -154,16 +281,27 @@ public class MaAuthgrpController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateAuthGrpUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateAuthGrpUpdt(@Validated MaAuthgrpVO vo, BindingResult bindingResult){
|
||||
@RequestMapping(value = "/updateAuthGrpUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateAuthGrpUpdt(@Validated BOMaAuthgrpVO vo, BindingResult bindingResult){
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/updateBOAuthGrpUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
DataMap content = new DataMap();
|
||||
content = service.updateBOAuthGrpUpdt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/updateBOAuthGrpUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -171,12 +309,27 @@ public class MaAuthgrpController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteAuthGrpDel", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> deleteAuthGrpDel(MaAuthgrpVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/deleteBOAuthGrpDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
@RequestMapping(value = "/deleteAuthGrpDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteAuthGrpDel(BOMaAuthgrpVO vo) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
String mbrId = MemberJwtContextHolder.getMemberInfo().getId();
|
||||
String mbrDvCd = MemberJwtContextHolder.getMemberInfo().getMbrDvCd();
|
||||
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content = service.updateBOAuthGrpDel(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/deleteBOAuthGrpDel", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,13 +338,31 @@ public class MaAuthgrpController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthGrpListInqirePopup")
|
||||
public String selectAuthGrpListInqirePopup(MaAuthgrpVO vo, ModelMap model) {
|
||||
public String selectAuthGrpListInqirePopup(BOMaAuthgrpVO vo, ModelMap model) {
|
||||
DataMap content = new DataMap();
|
||||
// 페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqirePopup", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
content.put("paramVO", vo);
|
||||
|
||||
List<DataMap> fnctList = service.selectBOFnctListInqire(vo);
|
||||
content.put("fnctList", fnctList);
|
||||
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/authgrp/selectBOAuthGrpListInqirePopup", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/authgrp/maAuthGrpListInqirePopupR";
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -20,14 +21,15 @@ public class BOMaAuthgrpVO extends AbstractVO {
|
||||
// private String authorGroupCd;
|
||||
|
||||
/** 권한그룹명 */
|
||||
@NotEmpty(message = "권한그룹명")
|
||||
private String authorNm;
|
||||
// private String authorGroupNm;
|
||||
|
||||
/** 권한그룹설명 */
|
||||
@NotEmpty(message = "권한그룹설명")
|
||||
private String authorDc;
|
||||
// private String authorGroupDc;
|
||||
|
||||
|
||||
/** 권한그룹목록 */
|
||||
/** 권한명 */
|
||||
private String srchAuthorNm;
|
||||
@@ -86,7 +88,9 @@ public class BOMaAuthgrpVO extends AbstractVO {
|
||||
private DataMap codeMap;
|
||||
private List<DataMap> codeList;
|
||||
|
||||
@NotEmpty(message = "시스템 구분")
|
||||
private String sysDvCd;
|
||||
|
||||
private String sysDvNm;
|
||||
|
||||
private int updusr;
|
||||
|
||||
@@ -3,12 +3,18 @@ package com.wb.domainserver.domain.admin.sys.author.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.sys.author.service.BOMaAuthorService;
|
||||
import com.wb.domainserver.domain.admin.sys.author.vo.BOMaAuthorVO;
|
||||
import com.wb.domainserver.domain.admin.sys.author.vo.MaAuthorVO;
|
||||
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;
|
||||
@@ -19,6 +25,7 @@ import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||
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;
|
||||
@@ -50,8 +57,6 @@ import java.util.*;
|
||||
@RequestMapping("/admin/sys/author")
|
||||
public class MaAuthorController {
|
||||
|
||||
@Autowired
|
||||
private BOMaAuthorService service;
|
||||
/** WebClient 호출을 위한 wrapper */
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
@@ -62,17 +67,40 @@ public class MaAuthorController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMaAuthorService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 권한 목록 화면
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthorListInqireForm")
|
||||
public String selectAuthorListInqireForm(MaAuthorVO vo, ModelMap model) {
|
||||
public String selectAuthorListInqireForm(BOMaAuthorVO vo, ModelMap model) {
|
||||
DataMap resultMap = new DataMap();
|
||||
// 페이징
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqireForm",vo)
|
||||
);
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<DataMap> codeList = service.managerCode();
|
||||
resultMap.put("cgn036", codeList);
|
||||
|
||||
resultMap.put("paramVO", vo);
|
||||
resultMap.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqireForm",vo)
|
||||
// );
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
@@ -80,9 +108,10 @@ public class MaAuthorController {
|
||||
|
||||
} catch(JsonProcessingException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
} catch(Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new WnbtRestException("에러가 발생했습니다."+e);
|
||||
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
|
||||
@@ -95,13 +124,32 @@ public class MaAuthorController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthorListInqire")
|
||||
public String selectAuthorListInqire(MaAuthorVO vo, ModelMap model) {
|
||||
public String selectAuthorListInqire(BOMaAuthorVO vo, ModelMap model) {
|
||||
DataMap content = new DataMap();
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
content.put("paramVO", vo);
|
||||
|
||||
List<DataMap> authorList = new ArrayList<>();
|
||||
authorList = service.selectBOAuthorListInqire(vo);
|
||||
content.put("authorList", authorList);
|
||||
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/author/maAuthorListInqireR";
|
||||
}
|
||||
@@ -112,12 +160,17 @@ public class MaAuthorController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectAuthorUpdtForm")
|
||||
public String selectAuthorUpdtForm(MaAuthorVO vo, ModelMap model) {
|
||||
public String selectAuthorUpdtForm(BOMaAuthorVO vo, ModelMap model) {
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorUpdtForm",vo)
|
||||
);
|
||||
DataMap resultMap = new DataMap();
|
||||
resultMap = service.selectBOAuthorUpdtForm(vo);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthorUpdtForm",vo)
|
||||
// );
|
||||
|
||||
resultMap.put("srchInfo", vo);
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
@@ -129,12 +182,23 @@ public class MaAuthorController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/updateAuthorUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateAuthorUpdt(MaAuthorVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/updateBOAuthorUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
@RequestMapping(value ="/updateAuthorUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateAuthorUpdt(BOMaAuthorVO vo) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content = service.updateBOAuthorUpdt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/updateBOAuthorUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,12 +206,20 @@ public class MaAuthorController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/selectAuthGrpFuntPopup")
|
||||
public ResponseEntity<WnbtResponse> selectAuthGrpFuntPopup(MaAuthorVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthGrpFuntPopup", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
@RequestMapping(value ="/selectAuthGrpFuntPopup", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectAuthGrpFuntPopup(BOMaAuthorVO vo) {
|
||||
DataMap content = new DataMap();
|
||||
content = service.selectBOMenuFnctListInqire(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/author/selectBOAuthGrpFuntPopup", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
package com.wb.domainserver.domain.admin.sys.comncd.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.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.MaComncdVO;
|
||||
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.excel.ExcelDownloadUtil;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
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;
|
||||
@@ -51,166 +60,274 @@ public class MaComncdController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
/**
|
||||
* 공통코드 목록 조회 폼
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectCmmnCodeListInqireForm")
|
||||
public String selectCmmnCodeListInqireForm(MaComncdVO maComncdVO,
|
||||
ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectCmmnCodeListInqireForm(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("BOMaComncdVO", boMaComncdVO);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/comncd/MaCmmnCodeListInqireRForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드 목록 조회 리스트
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectCmmnCodeListInqire")
|
||||
public String selectCmmnCodeListInqire(MaComncdVO maComncdVO,
|
||||
ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectCmmnCodeListInqire(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(boMaComncdVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(boMaComncdVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
boMaComncdVO.setPaginationInfo(paginationInfo);
|
||||
boMaComncdVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
boMaComncdVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
boMaComncdVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//공통코드 목록조회
|
||||
List<DataMap> list = service.selectBOCmmnCodeListInqire(boMaComncdVO);
|
||||
|
||||
content.put("BOMaComncdVO", boMaComncdVO);
|
||||
content.put("paginationInfo", boMaComncdVO.getPaginationInfo());
|
||||
content.put("list", list);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/comncd/MaCmmnCodeListInqireR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드 등록 화면이동
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectCmmnCodeRegistForm")
|
||||
public String selectCmmnCodeRegistForm(MaComncdVO maComncdVO,
|
||||
ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectCmmnCodeRegistForm(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("BOMaComncdVO", boMaComncdVO);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqireForm", maComncdVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/comncd/MaCmmnCodeRegistC";
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드 수정 화면이동
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectCmmnCodeUpdtForm")
|
||||
public String selectCmmnCodeUpdtForm(MaComncdVO maComncdVO,
|
||||
ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeUpdtForm", maComncdVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectCmmnCodeUpdtForm(BOMaComncdVO boMaComncdVO, ModelMap model) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
List<DataMap> CodeGrouplist = service.selectBOCmmnCodeGroupDetail(boMaComncdVO);
|
||||
List<DataMap> list = service.selectBOCommcdDetailAllList(boMaComncdVO);
|
||||
|
||||
resultMap.put("BOMaComncdVO", boMaComncdVO);
|
||||
resultMap.put("CodeGrouplist", CodeGrouplist);
|
||||
resultMap.put("list", list);
|
||||
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeUpdtForm", maComncdVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/comncd/MaCmmnCodeUpdtU";
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드(코드그룹, 코드) 등록 처리
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @param bindingResult
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertCmmnCodeRegist", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> insertCmmnCodeRegist(@Validated MaComncdVO maComncdVO, BindingResult bindingResult) {
|
||||
|
||||
@RequestMapping(value = "/insertCmmnCodeRegist", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertCmmnCodeRegist(@Validated BOMaComncdVO boMaComncdVO, BindingResult bindingResult) {
|
||||
//정합성 검사
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
boMaComncdVO.setRegusr(user.getUserInnb());
|
||||
boMaComncdVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/insertBOCmmnCodeRegist", maComncdVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
Integer result = service.selectBOCmmnCodeGrpIdDplctInqire(boMaComncdVO.getGroupCd());
|
||||
if (result > 0) {
|
||||
message.put("result", "dublechk");
|
||||
} else{
|
||||
message = service.saveBOCmmnCode(boMaComncdVO);
|
||||
}
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/insertBOCmmnCodeRegist", maComncdVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드 코드그룹 ID 중복 조회
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectCmmnCodeGrpIdDplctInqire")
|
||||
public ResponseEntity<?> selectCmmnCodeGrpIdDplctInqire(MaComncdVO maComncdVO) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeGrpIdDplctInqire", maComncdVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
@RequestMapping(value = "/selectCmmnCodeGrpIdDplctInqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> selectCmmnCodeGrpIdDplctInqire(BOMaComncdVO boMaComncdVO) {
|
||||
Integer result = service.selectBOCmmnCodeGrpIdDplctInqire(boMaComncdVO.getGroupCd());
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeGrpIdDplctInqire", maComncdVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드(코드그룹, 코드) 수정 처리
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @param bindingResult
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateCmmnCodeUpdt", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> updateCmmnCodeUpdt(@Validated MaComncdVO maComncdVO, BindingResult bindingResult) {
|
||||
|
||||
@RequestMapping(value = "/updateCmmnCodeUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateCmmnCodeUpdt(@Validated BOMaComncdVO boMaComncdVO, BindingResult bindingResult) {
|
||||
//정합성 검사
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/saveBOCmmnCode", maComncdVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
Map<String, Object> message = new HashMap<>();
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
boMaComncdVO.setRegusr(user.getUserInnb());
|
||||
boMaComncdVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
message = service.saveBOCmmnCode(boMaComncdVO);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/saveBOCmmnCode", maComncdVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드 삭제(논리, USE_AT Y->N)
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteCmmnCodeDel", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> deleteCmmnCodeDel(MaComncdVO maComncdVO) {
|
||||
@RequestMapping(value = "/deleteCmmnCodeDel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteCmmnCodeDel(BOMaComncdVO boMaComncdVO) {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
boMaComncdVO.setRegusr(user.getUserInnb());
|
||||
boMaComncdVO.setUpdusr(user.getUserInnb());
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/deleteBOCmmnCodeDel", maComncdVO),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
Map<String, Object> message = service.deleteBOCmmnCodeDel(boMaComncdVO);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/deleteBOCmmnCodeDel", maComncdVO),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 공통코드 엑셀 다운로드
|
||||
* @param maComncdVO
|
||||
* @param boMaComncdVO
|
||||
* @param response
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/selectBOCmmnCodeListExcelDwld", method = RequestMethod.POST)
|
||||
public void selectBOCmmnCodeListExcelDwld(MaComncdVO maComncdVO, HttpServletResponse response) {
|
||||
public void selectBOCmmnCodeListExcelDwld(BOMaComncdVO boMaComncdVO, HttpServletResponse response) {
|
||||
|
||||
maComncdVO.setPageIndex(1); //10000건까지 엑셀 출력
|
||||
maComncdVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO)
|
||||
);
|
||||
boMaComncdVO.setPageIndex(1); //10000건까지 엑셀 출력
|
||||
boMaComncdVO.setPageUnit(10000); //10000건까지 엑셀 출력
|
||||
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
//페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(boMaComncdVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(boMaComncdVO.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
//페이징 처리를 위한 값 설정
|
||||
boMaComncdVO.setPaginationInfo(paginationInfo);
|
||||
boMaComncdVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
boMaComncdVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
boMaComncdVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
//공통코드 목록조회
|
||||
List<DataMap> list = service.selectBOCmmnCodeListInqire(boMaComncdVO);
|
||||
|
||||
resultMap.put("BOMaComncdVO", boMaComncdVO);
|
||||
resultMap.put("paginationInfo", boMaComncdVO.getPaginationInfo());
|
||||
resultMap.put("list", list);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/comncd/selectBOCmmnCodeListInqire", maComncdVO)
|
||||
// );
|
||||
|
||||
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("list");
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.wb.domainserver.domain.admin.sys.comncd.vo;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -14,8 +15,10 @@ public class BOMaComncdDetailVO extends AbstractVO {
|
||||
/** 그룹코드 */
|
||||
private String groupCd;
|
||||
/** 코드 */
|
||||
@NotBlank(message = "코드")
|
||||
private String cd;
|
||||
/** 코드명 */
|
||||
@NotBlank(message = "코드명")
|
||||
private String cdNm;
|
||||
/** 코드설명 */
|
||||
private String cdDc;
|
||||
|
||||
@@ -4,6 +4,8 @@ import java.util.List;
|
||||
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -30,16 +32,19 @@ import lombok.EqualsAndHashCode;
|
||||
public class BOMaComncdVO extends AbstractVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/** 그룹코드 */
|
||||
@NotBlank(message = "코드그룹 ID")
|
||||
private String groupCd;
|
||||
/** 코드그룹명 */
|
||||
@NotBlank(message = "코드그룹 명")
|
||||
private String groupCdNm;
|
||||
/** 코드그룹설명 */
|
||||
private String groupCdDc;
|
||||
/** 코드그룹 사용여부 */
|
||||
private String groupUseAt;
|
||||
/** 코드정보 */
|
||||
@Valid
|
||||
private List<BOMaComncdDetailVO> comncdDetailVOList;
|
||||
|
||||
/** 검색 타입 */
|
||||
|
||||
@@ -8,11 +8,18 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
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.admin.sys.fnct.service.BOMaFnctService;
|
||||
import com.wb.domainserver.domain.admin.sys.fnct.vo.BOFnctVO;
|
||||
import com.wb.domainserver.security.authentication.AnonymousUser;
|
||||
import com.wb.domainserver.security.authentication.MemberJwtContextHolder;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -47,9 +54,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@RequestMapping("/admin/sys/fnct")
|
||||
public class MaFnctControlelr {
|
||||
|
||||
@Autowired
|
||||
private BOMaFnctService service;
|
||||
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@@ -59,20 +63,55 @@ public class MaFnctControlelr {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMaFnctService service;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService boMaComncdService;
|
||||
|
||||
/**
|
||||
* 기능 목록 화면
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectFnctListInqireForm")
|
||||
public String selectFnctListInqireForm(MaFnctVO vo, ModelMap model) {
|
||||
public String selectFnctListInqireForm(BOFnctVO vo, ModelMap model) {
|
||||
DataMap content = new DataMap();
|
||||
|
||||
// 페이징 처리를 위한 pagination 객체 생성
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqireForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
content.put("paramVO", vo);
|
||||
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
DataMap codeMap = new DataMap();
|
||||
codeMap = service.selectBOFnctCode();
|
||||
codeList.add(codeMap);
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SYS_DV"); // 관리자구분코드(MNGR_DV)->시스템구분(SYS_DV) --시스템구분
|
||||
List<?> mngrDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
content.put("codeList", codeList);
|
||||
content.put("mngrDvList", mngrDvList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqireForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/fnct/maFnctListInqireForm";
|
||||
}
|
||||
@@ -82,14 +121,39 @@ public class MaFnctControlelr {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectFnctListInqire")
|
||||
public String selectFnctListInqire(MaFnctVO vo, ModelMap model) {
|
||||
public String selectFnctListInqire(BOFnctVO vo, ModelMap model) {
|
||||
// 페이징 처리를 위한 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());
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
content.put("paramVO", vo);
|
||||
|
||||
List<DataMap> fnctList = new ArrayList<>();
|
||||
fnctList = service.selectBOFnctListInqire(vo);
|
||||
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
DataMap codeMap = new DataMap();
|
||||
codeMap = service.selectBOFnctCode();
|
||||
codeList.add(codeMap);
|
||||
|
||||
content.put("resultList", fnctList);
|
||||
content.put("codeList", codeList);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "admin/sys/fnct/maFnctListInqire";
|
||||
}
|
||||
|
||||
@@ -99,14 +163,27 @@ public class MaFnctControlelr {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectFnctRegistForm")
|
||||
public String selectFnctRegistForm(MaFnctVO vo, ModelMap model) {
|
||||
public String selectFnctRegistForm(BOFnctVO vo, ModelMap model) {
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
codeList = service.selectBOFnctRegistForm();
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SYS_DV"); //시스템구분(SYS_DV)
|
||||
List<?> mngrDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctRegistForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
DataMap content = new DataMap();
|
||||
content.put("codeList", codeList);
|
||||
content.put("vo", vo);
|
||||
content.put("mngrDvList", mngrDvList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctRegistForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/fnct/maFnctC";
|
||||
}
|
||||
@@ -116,9 +193,8 @@ public class MaFnctControlelr {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertFnctRegist")
|
||||
public ResponseEntity<WnbtResponse> insertFnctRegist(@Validated MaFnctVO vo, BindingResult bindingResult) {
|
||||
|
||||
@RequestMapping(value = "/insertFnctRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertFnctRegist(@Validated BOFnctVO vo, BindingResult bindingResult) {
|
||||
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
@@ -127,10 +203,22 @@ public class MaFnctControlelr {
|
||||
throw new WnbtRestException("URL 중복확인 해주세요.");
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/insertBOFnctRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
DataMap result = new DataMap();
|
||||
result = service.insertBOFnctRegist(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/insertBOFnctRegist", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,13 +226,20 @@ public class MaFnctControlelr {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectFnctUrlDplctInqire")
|
||||
public ResponseEntity<WnbtResponse> selectFnctUrlDplctInqire(MaFnctVO vo) {
|
||||
@RequestMapping(value = "/selectFnctUrlDplctInqire", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectFnctUrlDplctInqire(BOFnctVO vo) {
|
||||
DataMap result = new DataMap();
|
||||
result = service.selectBOFnctUrlDplctInqire(vo);
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUrlDplctInqire", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUrlDplctInqire", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,14 +248,36 @@ public class MaFnctControlelr {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectFnctUpdtForm")
|
||||
public String selectFnctUpdtForm(MaFnctVO vo, ModelMap model) {
|
||||
public String selectFnctUpdtForm(BOFnctVO vo, ModelMap model) {
|
||||
BOFnctVO fnctVo = new BOFnctVO();
|
||||
fnctVo = service.selectBOfnctUpdtForm(vo);
|
||||
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
codeList = service.selectBOFnctRegistForm();
|
||||
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUpdtForm", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
fnctVo.setSrchFnctDv(vo.getSrchFnctDv());
|
||||
fnctVo.setSrchFnctNm(vo.getSrchFnctNm());
|
||||
fnctVo.setSrchFnctUrl(vo.getSrchFnctUrl());
|
||||
fnctVo.setSrchSysDvCd(vo.getSrchSysDvCd());
|
||||
fnctVo.setPageIndex(vo.getPageIndex());
|
||||
fnctVo.setPageUnit(vo.getPageUnit());
|
||||
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("SYS_DV"); //시스템구분(SYS_DV)
|
||||
List<?> mngrDvList = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
content.put("codeList", codeList);
|
||||
content.put("vo", fnctVo);
|
||||
content.put("mngrDvList", mngrDvList);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/selectBOFnctUpdtForm", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
|
||||
return "admin/sys/fnct/maFnctU";
|
||||
}
|
||||
@@ -170,17 +287,26 @@ public class MaFnctControlelr {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateFnctUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateFnctUpdt(@Validated MaFnctVO vo, BindingResult bindingResult) {
|
||||
|
||||
|
||||
@RequestMapping(value = "/updateFnctUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateFnctUpdt(@Validated BOFnctVO vo, BindingResult bindingResult) {
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/updateBOFnctUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
DataMap result = new DataMap();
|
||||
result = service.updateBOFnctUpdt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/updateBOFnctUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,14 +314,24 @@ public class MaFnctControlelr {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/deleteFnctDel", method = RequestMethod.GET)
|
||||
public ResponseEntity<WnbtResponse> deleteFnctDel(MaFnctVO vo) {
|
||||
@RequestMapping(value = "/deleteFnctDel", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteFnctDel(BOFnctVO vo) {
|
||||
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/deleteBOFnctDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
DataMap result = new DataMap();
|
||||
result = service.deleteBOFnctDel(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/fnct/deleteBOFnctDel", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
//
|
||||
// /**
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -18,6 +19,7 @@ public class BOFnctVO extends AbstractVO {
|
||||
/** 기능ID */
|
||||
private String fnctId;
|
||||
/** 시스템자구분 */
|
||||
@NotBlank(message = "시스템 구분")
|
||||
private String sysDvCd;
|
||||
/** 시스템자구분 */
|
||||
private String sysDvCdNm;
|
||||
@@ -38,8 +40,10 @@ public class BOFnctVO extends AbstractVO {
|
||||
/** 메뉴명 */
|
||||
private String menuNm;
|
||||
/** 기능명 */
|
||||
@NotBlank(message = "기능명")
|
||||
private String fnctNm;
|
||||
/** 기능구분 조회|화면이동|수정|삭제 */
|
||||
@NotBlank(message = "기능구분")
|
||||
private String fnctDvCd;
|
||||
/** 기능Url */
|
||||
private String fnctUrl;
|
||||
@@ -65,6 +69,8 @@ public class BOFnctVO extends AbstractVO {
|
||||
private DataMap codeMap;
|
||||
private List<DataMap> codeList;
|
||||
|
||||
/** 중복 여부 */
|
||||
private String isChckDup;
|
||||
|
||||
/* 권한메뉴기능고유번호 */
|
||||
private String authorMenuFnctInnb;
|
||||
|
||||
@@ -2,20 +2,32 @@ package com.wb.domainserver.domain.admin.sys.menu.controller;
|
||||
|
||||
import com.nimbusds.jose.shaded.gson.Gson;
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.admin.sys.menu.service.BOMaMenuService;
|
||||
import com.wb.domainserver.domain.admin.sys.menu.vo.BOMaMenuVO;
|
||||
import com.wb.domainserver.domain.admin.sys.menu.vo.MaMenuVO;
|
||||
import com.wb.domainserver.domain.admin.user.mngr.service.BOMaMngrService;
|
||||
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.communicate.RESRC;
|
||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -48,6 +60,14 @@ public class MaMenuController {
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMaMenuService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaMngrService mngrService;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService boMaComncdService;
|
||||
|
||||
/**
|
||||
* 메뉴 수정 화면이동
|
||||
@@ -55,10 +75,20 @@ public class MaMenuController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectMenuSaveForm")
|
||||
public String selectMenuSaveForm(MaMenuVO vo, ModelMap model) {
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/selectBOMenuListInqire",vo)
|
||||
);
|
||||
public String selectMenuSaveForm(BOMaMenuVO vo, ModelMap model) {
|
||||
// 공통코드 호출
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("EXPSR_LC_DV"); //노출위치구분 (EXPSR_LC_DV)
|
||||
List<?> expsrLcDvCd = boMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("expsrLcDvCd", expsrLcDvCd);
|
||||
resultMap.put("menuList", service.selectBOMenuManage(vo));
|
||||
resultMap.put("mngrDvList", mngrService.selectBOMngrDvList());
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/selectBOMenuListInqire",vo)
|
||||
// );
|
||||
List<Map<String, Object>> resultMapList = (List<Map<String, Object>>) resultMap.get("menuList");
|
||||
String jsonMenuList = new Gson().toJson(resultMapList);
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
@@ -72,13 +102,26 @@ public class MaMenuController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/updateMenuUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateMenuUpdt(MaMenuVO vo, BindingResult bindingResult) {
|
||||
@RequestMapping(value = "/updateMenuUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMenuUpdt(BOMaMenuVO vo, BindingResult bindingResult) {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/updateBOMenuUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
//메뉴 저장 로직
|
||||
DataMap message = new DataMap();
|
||||
message = service.updateBOMenuManage(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/updateBOMenuUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,12 +129,25 @@ public class MaMenuController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/deleteMenuDel")
|
||||
public ResponseEntity<WnbtResponse> deleteMenuDel(MaMenuVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/deleteBOMenuDel", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
@RequestMapping(value = "/deleteMenuDel", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> deleteMenuDel(BOMaMenuVO vo) {
|
||||
//사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
//메뉴 삭제 로직
|
||||
DataMap message = service.deleteBOMenuManage(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(message))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/sys/menu/deleteBOMenuDel", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,50 @@
|
||||
package com.wb.domainserver.domain.admin.user.mbr.controller;
|
||||
|
||||
import com.wb.domainserver.domain.mngr.mbr.vo.MbrAppnVO;
|
||||
import com.wb.domainserver.domain.mngr.mbr.vo.WithdrawalVO;
|
||||
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.mbr.mbr.service.BOMbrService;
|
||||
import com.wb.domainserver.domain.gcone.mbr.mbr.vo.BOMbrAppnVO;
|
||||
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.mbr.mbr.vo.BOWithdrawalVO;
|
||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.service.BOOrdrMngrService;
|
||||
import com.wb.domainserver.domain.gcone.setup.ordrmngr.vo.BOSetupOrdrVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.util.communicate.*;
|
||||
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.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
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 jakarta.servlet.http.HttpSession;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||
import com.wb.domainserver.domain.admin.user.mbr.vo.MaMbrSrchVO;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtResponseBody;
|
||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||
import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -59,23 +76,90 @@ public class MaMbrController {
|
||||
/** 공통 메시지 처리를 위한 메시지 객체 */
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
@Autowired
|
||||
private BOMbrService service;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private BOMaSopmalService maSopmalService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
@Autowired
|
||||
private BOMssageService boMssageService;
|
||||
|
||||
@Autowired
|
||||
private BOOrdrMngrService boOrdrMngrService;
|
||||
|
||||
/**
|
||||
* 회원 목록 검색 폼 조회
|
||||
* @param maMbrSrchVO
|
||||
* @param vo
|
||||
* @return MaMbrListInqireR.jsp
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMaMbrListInqireForm")
|
||||
public String selectMaMbrListInqireForm(ModelMap model,MaMbrSrchVO maMbrSrchVO) {
|
||||
/*페이지 구분 set => 브랜드 조회*/
|
||||
maMbrSrchVO.setReqPageDv("integ");
|
||||
public String selectMaMbrListInqireForm(ModelMap model,BOMbrSrchVO vo) {
|
||||
|
||||
//BO에서 API 호출(회원 목록 조회)
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqireForm", maMbrSrchVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
/*페이지 구분 set => 브랜드 조회*/
|
||||
vo.setReqPageDv("integ");
|
||||
|
||||
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", maMbrSrchVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "admin/use/mbr/MaMbrListInqireRForm";
|
||||
}
|
||||
|
||||
@@ -85,13 +169,50 @@ public class MaMbrController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectMaMbrListInqire")
|
||||
public String selectMbrMaListInqire(ModelMap model,MaMbrSrchVO maMbrSrchVO) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqire", maMbrSrchVO),
|
||||
model,
|
||||
"resultListMap"
|
||||
);
|
||||
model.addAttribute("maMbrSrchVO",maMbrSrchVO);
|
||||
public String selectMbrMaListInqire(ModelMap model,BOMbrSrchVO vo) {
|
||||
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("resultListMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrListInqire", maMbrSrchVO),
|
||||
// model,
|
||||
// "resultListMap"
|
||||
// );
|
||||
model.addAttribute("maMbrSrchVO",vo);
|
||||
return "admin/use/mbr/MaMbrListInqireR";
|
||||
}
|
||||
|
||||
@@ -101,26 +222,46 @@ public class MaMbrController {
|
||||
* @return ResponseEntity<WnbtResponse>
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value = "/updateMaMbrRslrMvmn")
|
||||
public ResponseEntity<WnbtResponse> updateMaMbrRslrMvmn(@Validated MbrAppnVO vo, BindingResult bindingResult) {
|
||||
@PostMapping(value = "/updateMaMbrRslrMvmn", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMaMbrRslrMvmn(@Validated BOMbrAppnVO vo, BindingResult bindingResult) {
|
||||
|
||||
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="/updateMaMbrSecsnUpdt")
|
||||
public ResponseEntity<WnbtResponse> updateMaMbrSecsnUpdt (@Validated WithdrawalVO vo, BindingResult bindingResult, HttpServletRequest request){
|
||||
@PostMapping(value="/updateMaMbrSecsnUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> updateMaMbrSecsnUpdt (@Validated BOWithdrawalVO bowithdrawalVO, BindingResult bindingResult, HttpServletRequest request){
|
||||
//validation 체크
|
||||
if(bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
@@ -130,26 +271,130 @@ public class MaMbrController {
|
||||
Map<String,String> requestInfo = Util.getRequestInfo(request);
|
||||
String ip = (String) requestInfo.get("XForwardedFor");
|
||||
|
||||
//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
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 통합관리자 > 회원 정보 조회
|
||||
* @param maMbrSrchVO
|
||||
* @param vo
|
||||
* @return String
|
||||
*/
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@PostMapping(value="/selectMbrInfo")
|
||||
public String selectMbrInfo (ModelMap model,MaMbrSrchVO maMbrSrchVO){
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrCrmInfoPopupInqire", maMbrSrchVO),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectMbrInfo (ModelMap model,BOMbrVO vo){
|
||||
// 사용자 정보 추출 및 적용
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
if("01".equals(user.getSysDvCd())){
|
||||
vo.setSopmalCd(user.getSopmalCd());
|
||||
}else if ("04".equals(user.getSysDvCd())){//인트라넷이면 대표브랜드로 검색
|
||||
vo.setSopmalCd(user.getReprsntBrand());
|
||||
}
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
// 회원 활동 정보 조회 ( 마일리지, 쿠폰, 누적 결재 금액, 누적 주문 건수, 최근 로그인 ip, 최근 수정일시 )
|
||||
DataMap result = new DataMap();
|
||||
result = service.selectBOMbrActInfoInqire(vo);
|
||||
|
||||
|
||||
// sns 연동 조회
|
||||
List<DataMap> sns = new ArrayList<>();
|
||||
sns = service.selectBOMbrExtrlMbrInfoInqire(vo);
|
||||
|
||||
// 고객 주문관련, 게시글관련 데이터 조회
|
||||
Map<String, Object> orderData = new HashMap<>();
|
||||
orderData = service.selectBOMbrDataOrderInqireCrmPopup(vo);
|
||||
|
||||
// Shop 정보 조회
|
||||
BOSetupOrdrVO boOrdrVO = new BOSetupOrdrVO();
|
||||
boOrdrVO.setSopmalCd(vo.getSopmalCd());
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("shopInfo", boOrdrMngrService.selectBOOrdrSetupList(boOrdrVO));
|
||||
content.put("result", result);
|
||||
content.put("sns", sns);
|
||||
content.put("acttData", orderData);
|
||||
content.put("paramVO", vo);
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMbrCrmInfoPopupInqire", maMbrSrchVO),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "admin/use/mbr/MaMbrInfoPopupR";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,19 +2,36 @@ package com.wb.domainserver.domain.admin.user.mngr.controller;
|
||||
|
||||
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.sys.comncd.service.BOMaComncdService;
|
||||
import com.wb.domainserver.domain.admin.sys.comncd.vo.BOMaComncdVO;
|
||||
import com.wb.domainserver.domain.admin.user.mngr.service.BOJobUserService;
|
||||
import com.wb.domainserver.domain.admin.user.mngr.vo.BOJobUserVO;
|
||||
import com.wb.domainserver.domain.admin.user.mngr.vo.MAJobUserVO;
|
||||
import com.wb.domainserver.domain.gcone.common.service.BOCommonService;
|
||||
import com.wb.domainserver.domain.gcone.common.vo.BOCommonVO;
|
||||
import com.wb.domainserver.domain.gcone.setup.mngr.sevice.BOMngrInfoService;
|
||||
import com.wb.domainserver.domain.gcone.setup.mngr.vo.BOMngrInfoVO;
|
||||
import com.wb.domainserver.domain.mngr.setup.mngr.vo.SetupMngrInfoVO;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.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.communicate.SendToResrc;
|
||||
import com.wb.domainserver.util.communicate.ValidateResultConverter;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.excel.ExcelDownloadUtil;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
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;
|
||||
@@ -24,6 +41,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -33,35 +51,74 @@ import java.util.regex.Pattern;
|
||||
@RequestMapping("/admin/use/mngr")
|
||||
public class MAJobUserController {
|
||||
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
@Autowired
|
||||
private WnbtWebClientResponseHandler responseHandler;
|
||||
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
@Autowired
|
||||
private SendToResrc sendToResrc;
|
||||
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
@Autowired
|
||||
private GconeMessageSource gconeMessageSource;
|
||||
|
||||
/**
|
||||
@Autowired
|
||||
private PaginationProperties paginationProperties;
|
||||
@Autowired
|
||||
private BOJobUserService service;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService commonService;
|
||||
|
||||
@Autowired
|
||||
private BOJobUserService jobUserService;
|
||||
|
||||
@Autowired
|
||||
private BOMaComncdService bOMaComncdService;
|
||||
|
||||
@Autowired
|
||||
private BOCommonService boCommonService;
|
||||
|
||||
@Autowired
|
||||
private BOMngrInfoService boMngrInfoService;
|
||||
|
||||
/**
|
||||
* 업무 사용자 전체조회 화면
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectJobUserListInqireForm")
|
||||
public String selectJobUserListInqireForm(MAJobUserVO vo, ModelMap model) {
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqireForm",vo)
|
||||
);
|
||||
public String selectJobUserListInqireForm(BOJobUserVO vo, ModelMap model) {
|
||||
DataMap resultMap = new DataMap();
|
||||
// 페이징
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
resultMap.put("paramVO", vo);
|
||||
List<DataMap> codeList = service.managerCode();
|
||||
resultMap.put("cgn036", codeList);
|
||||
resultMap.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqireForm",vo)
|
||||
// );
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
resultMap.put("cgn036", objectMapper.writeValueAsString(resultMap.get("cgn036")));
|
||||
|
||||
} 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);
|
||||
}
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
|
||||
@@ -69,33 +126,66 @@ public class MAJobUserController {
|
||||
}
|
||||
/**
|
||||
* 업무 사용자 조회 리스트 화면
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectJobUserListInqire")
|
||||
public String selectJobUserListInqire(MAJobUserVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectJobUserListInqire(BOJobUserVO vo, ModelMap model) {
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
|
||||
// 페이징
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
// 맵에 페이징 정보와 리스트를 넣어줌
|
||||
content.put("paramVO", vo);
|
||||
|
||||
List<DataMap> resultList = service.selectBOJobUserListInqire(vo);
|
||||
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "admin/use/mngr/maJobUserListInqireR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 업무 사용자 등록 화면이동
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return 등록폼경로
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/selectJobUserRegistForm")
|
||||
public String selectJobUserRegistForm(MAJobUserVO vo, ModelMap model) {
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserRegistForm",vo)
|
||||
);
|
||||
public String selectJobUserRegistForm(BOJobUserVO vo, ModelMap model) {
|
||||
DataMap resultMap = new DataMap();
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
codeList = service.emailCode();
|
||||
List<DataMap> managerCodeList = new ArrayList<>();
|
||||
managerCodeList = service.managerCode();
|
||||
|
||||
resultMap.put("managerCodeList", managerCodeList);
|
||||
resultMap.put("emailCode", codeList);
|
||||
resultMap.put("vo", vo);
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserRegistForm",vo)
|
||||
// );
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
|
||||
@@ -111,13 +201,13 @@ public class MAJobUserController {
|
||||
|
||||
/**
|
||||
* 업무사용자 등록
|
||||
* @param MAJobUserVO
|
||||
* @param model
|
||||
* @param vo
|
||||
* @param bindingResult
|
||||
* @return ResponseEntity<String> 등록한 업무사용자 고유번호, 실패시 null
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/insertJobUserRegist")
|
||||
public ResponseEntity<WnbtResponse> insertJobUserRegist(@Validated MAJobUserVO vo, BindingResult bindingResult) {
|
||||
@RequestMapping(value = "/insertJobUserRegist", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> insertJobUserRegist(@Validated BOJobUserVO vo, BindingResult bindingResult) {
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
@@ -143,32 +233,80 @@ public class MAJobUserController {
|
||||
if(errorList != null && errorList.size() > 0) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||
}
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/insertBOJobUserRegist", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setRegusr(user.getUserInnb());
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
DataMap content = new DataMap();
|
||||
BigInteger result = BigInteger.ZERO;
|
||||
result = service.insertBOJobUserRegist(vo);
|
||||
content.put("mngrInnb", result);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/insertBOJobUserRegist", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 업무 사용자 수정 화면이동
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value ="/selectJobUserUpdtForm")
|
||||
public String selectJobUserUpdtForm(MAJobUserVO vo, ModelMap model) {
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserUpdtForm",vo)
|
||||
);
|
||||
public String selectJobUserUpdtForm(BOJobUserVO vo, ModelMap model) {
|
||||
DataMap resultMap = new DataMap();
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
List<DataMap> detail = new ArrayList<>();
|
||||
detail = service.selectBOJobUserDetail(vo);
|
||||
|
||||
List<DataMap> codeList = new ArrayList<>();
|
||||
codeList = service.emailCode();
|
||||
|
||||
List<DataMap> managerCodeList = new ArrayList<>();
|
||||
managerCodeList = service.managerCode();
|
||||
|
||||
DataMap srchData = new DataMap();
|
||||
srchData.put("srchType", vo.getSrchType());
|
||||
srchData.put("srchStr", vo.getSrchStr());
|
||||
srchData.put("srchMngrDv", vo.getSrchMngrDv());
|
||||
srchData.put("srchStartDate", vo.getSrchStartDate());
|
||||
srchData.put("srchEndDate", vo.getSrchEndDate());
|
||||
srchData.put("srchDatePick", vo.getSrchDatePick());
|
||||
srchData.put("pageUnit", vo.getPageUnit());
|
||||
srchData.put("pageIndex", vo.getPageIndex());
|
||||
srchData.put("pageDv", vo.getPageDv());
|
||||
|
||||
resultMap.put("srchData", srchData);
|
||||
resultMap.put("detail", detail);
|
||||
resultMap.put("managerCodeList", managerCodeList);
|
||||
resultMap.put("emailCode", codeList);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserUpdtForm",vo)
|
||||
// );
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
|
||||
resultMap.put("emailCode", objectMapper.writeValueAsString(resultMap.get("emailCode")));
|
||||
} 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);
|
||||
}
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
return "admin/use/mngr/maJobUserU";
|
||||
@@ -176,13 +314,12 @@ public class MAJobUserController {
|
||||
|
||||
/**
|
||||
* 업무 사용자 아이디 중복 조회
|
||||
* @param MAJobUserVO
|
||||
* @param model
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectJobUserIdbDplctInqire", method = RequestMethod.POST)
|
||||
public ResponseEntity<?> selectJobUserIdbDplctInqire(MAJobUserVO vo) {
|
||||
@RequestMapping(value = "/selectJobUserIdbDplctInqire", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> selectJobUserIdbDplctInqire(BOJobUserVO vo) {
|
||||
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
|
||||
@@ -195,49 +332,86 @@ public class MAJobUserController {
|
||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserIdbDplctInqire", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
int result = service.selectBOJobUserIdbDplctInqire(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserIdbDplctInqire", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 업무사용자 비밀번호 초기화
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateJobUserPswdInitl", method = RequestMethod.POST)
|
||||
public ResponseEntity<?> updateJobUserPswdInitl(MAJobUserVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserPswdInitl", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
@RequestMapping(value = "/updateJobUserPswdInitl", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateJobUserPswdInitl(BOJobUserVO vo) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
int result = service.updateBOJobUserPswdInitl(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserPswdInitl", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 업무사용자 활성화/비활성화
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateJobUserInactvty", method = RequestMethod.POST)
|
||||
public ResponseEntity<?> updateJobUserInactvty(MAJobUserVO vo) {
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserInactvty", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
@RequestMapping(value = "/updateJobUserInactvty", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateJobUserInactvty(BOJobUserVO vo) {
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
int result = 0;
|
||||
//활성화
|
||||
if(vo.getMngrSttusCd().equals("01")) {
|
||||
result = service.updateBOJobUserActvty(vo);
|
||||
}
|
||||
|
||||
// 비활성화
|
||||
if(vo.getMngrSttusCd().equals("02")) {
|
||||
result = service.updateBOJobUserInactvty(vo);
|
||||
// 퇴사처리
|
||||
}else if(vo.getMngrSttusCd().equals("03")) {
|
||||
result = service.updateBOJobUserResign(vo);
|
||||
}
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserInactvty", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 업무사용자 수정
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/updateJobUserUpdt", method = RequestMethod.POST)
|
||||
public ResponseEntity<?> updateJobUserUpdt(MAJobUserVO vo, BindingResult bindingResult) {
|
||||
@RequestMapping(value = "/updateJobUserUpdt", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateJobUserUpdt(BOJobUserVO vo, BindingResult bindingResult) {
|
||||
List<Map<String, String>> errorList = new ArrayList<>();
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
@@ -263,15 +437,28 @@ public class MAJobUserController {
|
||||
throw new WnbtRestException(ValidateResultConverter.convertCustomValidate(errorList));
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setUpdusr(user.getUserInnb());
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
|
||||
int result = service.updateBOJobUserUpdt(vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/updateBOJobUserUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* 업무사용자 접속이력 팝업폼(history)
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -284,24 +471,44 @@ public class MAJobUserController {
|
||||
|
||||
/**
|
||||
* 업무사용자 접속이력 팝업(history)
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectJobUserConnHistListInqirePopup")
|
||||
public String selectJobUserConnHistListInqirePopupList(MAJobUserVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserConnHistListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectJobUserConnHistListInqirePopupList(BOJobUserVO vo, ModelMap model) {
|
||||
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("paramVO", vo);
|
||||
|
||||
List<DataMap> resultList = new ArrayList<>();
|
||||
resultList = service.selectBOJobUserConnHistListInqire(vo);
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserConnHistListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "admin/use/mngr/maJobUserConnHistListInqirePopupR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 업무사용자 활동내역 팝업폼(log)
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -314,32 +521,66 @@ public class MAJobUserController {
|
||||
|
||||
/**
|
||||
* 업무사용자 활동내역 팝업(log)
|
||||
* @param MAJobUserVO
|
||||
* @param vo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping("/selectJobUserLogListInqirePopup")
|
||||
public String selectJobUserLogListInqirePopup(MAJobUserVO vo, ModelMap model) {
|
||||
responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserLogListInqire", vo),
|
||||
model,
|
||||
"resultMap"
|
||||
);
|
||||
public String selectJobUserLogListInqirePopup(BOJobUserVO vo, ModelMap model) {
|
||||
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("paramVO", vo);
|
||||
List<DataMap> resultList = service.selectBOJobUserLogListInqire(vo);
|
||||
content.put("resultList", resultList);
|
||||
content.put("paginationInfo", vo.getPaginationInfo());
|
||||
|
||||
model.addAttribute("resultMap", content);
|
||||
// responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserLogListInqire", vo),
|
||||
// model,
|
||||
// "resultMap"
|
||||
// );
|
||||
return "admin/use/mngr/maJobUserLogListInqirePopupR";
|
||||
}
|
||||
|
||||
/**
|
||||
* 엑셀 다운로드
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Policy(AuthPolicy.PUBLIC)
|
||||
@RequestMapping(value = "/excelFileDownload")
|
||||
public void excelFileDownload(MAJobUserVO vo, HttpServletResponse response, ModelMap model) {
|
||||
public void excelFileDownload(BOJobUserVO vo, HttpServletResponse response, ModelMap model) {
|
||||
DataMap resultMap = new DataMap();
|
||||
|
||||
Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListExcelDwld",vo)
|
||||
);
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(vo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(vo.getPageUnit());
|
||||
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
vo.setPaginationInfo(paginationInfo);
|
||||
vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
vo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<DataMap> resultList = service.selectBOJobUserListExcelDwld(vo);
|
||||
resultMap.put("excelList", resultList);
|
||||
|
||||
// Map<String,Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListExcelDwld",vo)
|
||||
// );
|
||||
|
||||
//엑셀 항목별 제목에 출력될 내용 설정
|
||||
LinkedHashMap<String, String> headerMap = new LinkedHashMap<String, String>();
|
||||
@@ -424,8 +665,8 @@ public class MAJobUserController {
|
||||
* @return
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value = "/selectJobUserPasswordInqire", method = RequestMethod.POST)
|
||||
public ResponseEntity<WnbtResponse> selectJobUserPasswordInqire(MAJobUserVO vo, BindingResult bindingResult) {
|
||||
@RequestMapping(value = "/selectJobUserPasswordInqire", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<WnbtResponse> selectJobUserPasswordInqire(BOJobUserVO vo, BindingResult bindingResult) {
|
||||
// 정합성 검사
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
@@ -444,10 +685,29 @@ public class MAJobUserController {
|
||||
}
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setMngrDv(user.getMbrDvCd());
|
||||
vo.setMngrInnb(new BigInteger(String.valueOf(user.getUserInnb())));
|
||||
|
||||
// vo.setMngrDv("01");
|
||||
// vo.setMngrInnb(0);
|
||||
Integer result = null;
|
||||
result = service.selectBOJobUserPasswordInqire(vo);
|
||||
|
||||
// Map객체에 필요 정보 할당
|
||||
Map<String, Object> content = new HashMap<>();
|
||||
content.put("result", result);
|
||||
content.put("paramVO", vo);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(content))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,10 +718,38 @@ public class MAJobUserController {
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/selectMngrInfoInqireForm")
|
||||
public String selectMngrInfoInqireForm(SetupMngrInfoVO vo, ModelMap model){
|
||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/selectBOMngrInfoUpdtForm", vo)
|
||||
);
|
||||
public String selectMngrInfoInqireForm(BOJobUserVO vo, ModelMap model){
|
||||
// 작성자 정보 추출
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
vo.setMngrInnb(BigInteger.valueOf(user.getUserInnb()));
|
||||
// if("01".equals(user.getSysDvCd())){
|
||||
// vo.setSopmalCd(user.getSopmalCd());
|
||||
// }
|
||||
|
||||
DataMap resultMap = new DataMap();
|
||||
|
||||
String secretKey = commonService.selectSecretkey();
|
||||
vo.setSecretKey(secretKey);
|
||||
List<DataMap> detail = new ArrayList<>();
|
||||
detail = jobUserService.selectBOJobUserDetail(vo);
|
||||
|
||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||
bOMaComncdVO.setGroupCd("EMAIL_ADRES");
|
||||
List<?> emailCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
bOMaComncdVO.setGroupCd("MNGR_DV");
|
||||
List<?> mngrDvCdList = bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO);
|
||||
|
||||
List<DataMap> managerCodeList = new ArrayList<>();
|
||||
managerCodeList = jobUserService.managerCode();
|
||||
|
||||
resultMap.put("detail", detail);
|
||||
resultMap.put("mngrDvCdList", mngrDvCdList);
|
||||
resultMap.put("emailCdList", emailCdList);
|
||||
|
||||
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/selectBOMngrInfoUpdtForm", vo)
|
||||
// );
|
||||
model.addAttribute("resultMap", resultMap);
|
||||
return "admin/use/mngr/MaMngrInfoDtlU";
|
||||
}
|
||||
@@ -471,8 +759,8 @@ public class MAJobUserController {
|
||||
* @param vo
|
||||
*/
|
||||
@Policy(AuthPolicy.RESTRICTED)
|
||||
@RequestMapping(value="/updateMngrInfoUpdt")
|
||||
public ResponseEntity<?> updateMngrInfoUpdt(@Validated SetupMngrInfoVO vo, BindingResult bindingResult){
|
||||
@RequestMapping(value="/updateMngrInfoUpdt", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<?> updateMngrInfoUpdt(@Validated SetupMngrInfoVO vo, BOJobUserVO boJobUserVO, BOMngrInfoVO boMngrInfoVO, BindingResult bindingResult){
|
||||
if (bindingResult.hasErrors()) {
|
||||
throw new WnbtRestException(ValidateResultConverter.convert(bindingResult, gconeMessageSource));
|
||||
}
|
||||
@@ -480,10 +768,16 @@ public class MAJobUserController {
|
||||
/*비밀번호 체크*/
|
||||
if("Y".equals(vo.getPwChngAt())){
|
||||
/*1 비밀번호 변경 시 현재 비밀번호 확인*/
|
||||
Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo)
|
||||
);
|
||||
int result = (int) resultMap.get("result");
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
boJobUserVO.setMngrDv(user.getMbrDvCd());
|
||||
boJobUserVO.setMngrInnb(new BigInteger(String.valueOf(user.getUserInnb())));
|
||||
|
||||
int result = service.selectBOJobUserPasswordInqire(boJobUserVO);
|
||||
|
||||
// Map<String, Object> resultMap = responseHandler.handleResponseAsMap(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserPasswordInqire", vo)
|
||||
// );
|
||||
|
||||
if(result == 0){
|
||||
throw new WnbtRestException("현재 비밀번호가 일치하지 않습니다");
|
||||
}
|
||||
@@ -505,9 +799,45 @@ public class MAJobUserController {
|
||||
}
|
||||
}
|
||||
|
||||
return responseHandler.handleResponse(
|
||||
sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/updateBOMngrInfoUpdt", vo),
|
||||
ReplyFromResrc::getReply
|
||||
);
|
||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||
boMngrInfoVO.setUpdusr(user.getUserInnb());
|
||||
// if("01".equals(user.getSysDvCd())){
|
||||
// vo.setSopmalCd(user.getSopmalCd());
|
||||
// }
|
||||
|
||||
String secretKey = boCommonService.selectSecretkey();
|
||||
boMngrInfoVO.setSecretKey(secretKey);
|
||||
|
||||
DataMap resultInfo = new DataMap();
|
||||
|
||||
/*비밀번호 인증 수정*/
|
||||
if("Y".equals(vo.getPwChngAt())){
|
||||
/* 암호화 필수값
|
||||
pass(사용자입력 비밀번호)
|
||||
encptKeyDvCd(암호화키구분코드) => 01(회원),02(관리자), 03(매장)
|
||||
idntfcInnb(식별고유번호) => 회원/관리자/매장관리자 고유번호*/
|
||||
BOCommonVO commVO = new BOCommonVO();
|
||||
commVO.setPass(vo.getChngPw());
|
||||
commVO.setEncptKeyDvCd("02");
|
||||
commVO.setIdntfcInnb(String.valueOf(vo.getMngrInnb()));
|
||||
String encptyPw = boCommonService.generateKey(commVO);
|
||||
vo.setPassword(encptyPw);
|
||||
resultInfo.put("chngePwAt","Y");
|
||||
}else{
|
||||
resultInfo.put("chngePwAt","N");
|
||||
}
|
||||
|
||||
/*관리자 정보 수정*/
|
||||
int result = boMngrInfoService.updateBOMngrInfoUpdt(boMngrInfoVO);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
WnbtResponse.builder()
|
||||
.resBody(new WnbtResponseBody(result))
|
||||
.build()
|
||||
);
|
||||
// return responseHandler.handleResponse(
|
||||
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/setup/mngrInfo/updateBOMngrInfoUpdt", vo),
|
||||
// ReplyFromResrc::getReply
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.wb.domainserver.domain.admin.user.mngr.vo;
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
import com.wb.domainserver.common.validate.MngrPassword;
|
||||
import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@@ -25,13 +26,23 @@ public class BOJobUserVO extends AbstractVO {
|
||||
@NotBlank(message="사용자명")
|
||||
@Length(min = 1, max = 20, message = "사용자명")
|
||||
private String mngrNm;
|
||||
|
||||
/** 부서명 */
|
||||
@Length(max = 50, message = "부서명")
|
||||
private String partnm;
|
||||
|
||||
/** 사용자ID(관리자) */
|
||||
@NotBlank(message="아이디")
|
||||
private String mngrId;
|
||||
|
||||
/** 사용자비밀번호(관리자) */
|
||||
@NotBlank(message="비밀번호")
|
||||
@MngrPassword(message="비밀번호 규칙")
|
||||
@Length(min = 10, max = 20, message = "비밀번호")
|
||||
private String password;
|
||||
|
||||
/** 이메일 */
|
||||
@NotBlank(message="이메일")
|
||||
private String email;
|
||||
/** 전화번호 */
|
||||
private String telnb;
|
||||
@@ -99,5 +110,7 @@ public class BOJobUserVO extends AbstractVO {
|
||||
private String cnfirmChngPw;
|
||||
/*비밀번호 변경 여부*/
|
||||
private String pwChngAt;
|
||||
/** 비밀번호변경 여부 */
|
||||
private String mbrPwdChngAt;
|
||||
|
||||
}
|
||||
|
||||
@@ -188,5 +188,9 @@ public class BOMbrSrchVO extends AbstractVO {
|
||||
/** 웹 쿠폰 이벤트 광고 수신 예외 플래그 **/
|
||||
private String eventYn;
|
||||
|
||||
/*회원고유번호*/
|
||||
private String mbrInnb;
|
||||
/*회원구분코드*/
|
||||
private String mbrDvCd;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,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;
|
||||
|
||||
@@ -11,147 +13,144 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BOWithdrawalVO extends AbstractVO{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer withdrawalMbrInnb;
|
||||
/**회원 고유번호 배열*/
|
||||
private List<String> mbrarr;
|
||||
/**회원 구분코드 배열*/
|
||||
private List<String> mbrDvCdArr;
|
||||
/**회원고유번호*/
|
||||
private String mbrInnb;
|
||||
/**회원구분코드*/
|
||||
private String mbrDvCd;
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
/**회원명*/
|
||||
private String mbrNm;
|
||||
/**이메일*/
|
||||
private String email;
|
||||
/**휴대폰번호*/
|
||||
private String mbtlnb;
|
||||
/**전화번호*/
|
||||
private String telnb;
|
||||
/**우편번호*/
|
||||
private String zip;
|
||||
/**도로명, 지번*/
|
||||
private String adresDv;
|
||||
/**도로명주소*/
|
||||
private String rnmAdres;
|
||||
/**상세주소*/
|
||||
private String dtlAdres;
|
||||
/**성별*/
|
||||
private String sexdstn;
|
||||
/**일자는 01로 입력*/
|
||||
private String brthDe;
|
||||
/**탈퇴사유*/
|
||||
private String secsnResn;
|
||||
/**등록아이피*/
|
||||
private String registIp;
|
||||
/**메모*/
|
||||
private String memo;
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer withdrawalMbrInnb;
|
||||
/**회원 고유번호 배열*/
|
||||
private List<String> mbrarr;
|
||||
/**회원 구분코드 배열*/
|
||||
private List<String> mbrDvCdArr;
|
||||
/**회원고유번호*/
|
||||
private String mbrInnb;
|
||||
/**회원구분코드*/
|
||||
private String mbrDvCd;
|
||||
/** 쇼핑몰 코드 */
|
||||
private String sopmalCd;
|
||||
/**회원명*/
|
||||
private String mbrNm;
|
||||
/**이메일*/
|
||||
private String email;
|
||||
/**휴대폰번호*/
|
||||
private String mbtlnb;
|
||||
/**전화번호*/
|
||||
private String telnb;
|
||||
/**우편번호*/
|
||||
private String zip;
|
||||
/**도로명, 지번*/
|
||||
private String adresDv;
|
||||
/**도로명주소*/
|
||||
private String rnmAdres;
|
||||
/**상세주소*/
|
||||
private String dtlAdres;
|
||||
/**성별*/
|
||||
private String sexdstn;
|
||||
/**일자는 01로 입력*/
|
||||
private String brthDe;
|
||||
/**탈퇴사유*/
|
||||
@NotBlank(message = "탈퇴 사유")
|
||||
@Length(min = 1 , max = 1333)
|
||||
public String secsnResn;
|
||||
/**등록아이피*/
|
||||
private String registIp;
|
||||
/**메모*/
|
||||
private String memo;
|
||||
|
||||
// fm_member
|
||||
|
||||
|
||||
// fm_member
|
||||
/** 회원등급 */
|
||||
private String mbrGradInnb;
|
||||
|
||||
/** 회원등급 */
|
||||
private String mbrGradInnb;
|
||||
/** 유입경로번호 */
|
||||
private String inflowCoursNb;
|
||||
|
||||
/** 유입경로번호 */
|
||||
private String inflowCoursNb;
|
||||
/** 가입환경코드 */
|
||||
private String sbscrbEnvrnCd;
|
||||
|
||||
/** 가입환경코드 */
|
||||
private String sbscrbEnvrnCd;
|
||||
/** 회원유형코드 */
|
||||
private String mbrTyCd;
|
||||
|
||||
/** 회원유형코드 */
|
||||
private String mbrTyCd;
|
||||
/** 회원ID */
|
||||
|
||||
/** 회원ID */
|
||||
|
||||
private String mbrid;
|
||||
private String mbrid;
|
||||
|
||||
/** 회원비밀번호 */
|
||||
|
||||
private String mbrPassword;
|
||||
|
||||
/** 변결할 비밀번호 */
|
||||
private String newPassword;
|
||||
/** 회원비밀번호 */
|
||||
|
||||
/** 비밀번호변경일자 */
|
||||
private String passwordChngDe;
|
||||
private String mbrPassword;
|
||||
|
||||
/** 변결할 비밀번호 */
|
||||
private String newPassword;
|
||||
|
||||
/** 비밀번호변경일자 */
|
||||
private String passwordChngDe;
|
||||
|
||||
|
||||
|
||||
/** 이메일수신여부 */
|
||||
private String emailRecptnAt;
|
||||
/** 이메일수신여부 */
|
||||
private String emailRecptnAt;
|
||||
|
||||
|
||||
|
||||
/** SMS수신여부 */
|
||||
private String smsRecptnAt;
|
||||
/** SMS수신여부 */
|
||||
private String smsRecptnAt;
|
||||
|
||||
|
||||
|
||||
/** 지번주소 */
|
||||
private String lnbAdres;
|
||||
|
||||
|
||||
|
||||
/** 상태 */
|
||||
private String sttus;
|
||||
|
||||
/** 상태 */
|
||||
private String unitySvcCnsOffrInfo;
|
||||
|
||||
/** 통합서비스정보제공동의 */
|
||||
private String indvdlInfoValidPd;
|
||||
|
||||
/** 광고수신동의변경일시 */
|
||||
private String advrtsRecptnAgreUpdtDt;
|
||||
|
||||
/** 광고수신동의전송일시 */
|
||||
private String advrtsRecptnAgreTrnsmisDt;
|
||||
|
||||
/** GCONE 가입여부 */
|
||||
private String gconeSbscrbAt;
|
||||
|
||||
/** 관리자메모 */
|
||||
private String mngrMemo;
|
||||
|
||||
/** 관리자로그 */
|
||||
private String mngrLog;
|
||||
|
||||
/** 주문번호 */
|
||||
private String ordrInnb;
|
||||
|
||||
// 외부연동 회원 ( kakao; naver; pos )
|
||||
/** 외부연동순번 */
|
||||
private Integer extrlIntrlckSnb;
|
||||
/** 지번주소 */
|
||||
private String lnbAdres;
|
||||
|
||||
|
||||
/** 외부연동구분코드 */
|
||||
private String extrlIntrlckDvCd;
|
||||
|
||||
/** 외부연동ID */
|
||||
private String extrlIntrlckId;
|
||||
|
||||
|
||||
|
||||
// fm_member_join
|
||||
|
||||
/** 상태 */
|
||||
private String sttus;
|
||||
|
||||
/** 마케팅 수신 동의 여부 */
|
||||
private String marktRecptnAgreAt;
|
||||
/** 상태 */
|
||||
private String unitySvcCnsOffrInfo;
|
||||
|
||||
/*시크릿키*/
|
||||
private String secretKey;
|
||||
/** 통합서비스정보제공동의 */
|
||||
private String indvdlInfoValidPd;
|
||||
|
||||
/*서버구분*/
|
||||
private String serverDv;
|
||||
/** 광고수신동의변경일시 */
|
||||
private String advrtsRecptnAgreUpdtDt;
|
||||
|
||||
/*관리자 로그 관련*/
|
||||
private String mngrLogStrt;
|
||||
private String mngrLogEnd;
|
||||
/** 광고수신동의전송일시 */
|
||||
private String advrtsRecptnAgreTrnsmisDt;
|
||||
|
||||
/** GCONE 가입여부 */
|
||||
private String gconeSbscrbAt;
|
||||
|
||||
/** 관리자메모 */
|
||||
private String mngrMemo;
|
||||
|
||||
/** 관리자로그 */
|
||||
private String mngrLog;
|
||||
|
||||
/** 주문번호 */
|
||||
private String ordrInnb;
|
||||
|
||||
// 외부연동 회원 ( kakao; naver; pos )
|
||||
/** 외부연동순번 */
|
||||
private Integer extrlIntrlckSnb;
|
||||
|
||||
|
||||
/** 외부연동구분코드 */
|
||||
private String extrlIntrlckDvCd;
|
||||
|
||||
/** 외부연동ID */
|
||||
private String extrlIntrlckId;
|
||||
|
||||
|
||||
|
||||
// fm_member_join
|
||||
|
||||
|
||||
/** 마케팅 수신 동의 여부 */
|
||||
private String marktRecptnAgreAt;
|
||||
|
||||
/*시크릿키*/
|
||||
private String secretKey;
|
||||
|
||||
/*서버구분*/
|
||||
private String serverDv;
|
||||
|
||||
/*관리자 로그 관련*/
|
||||
private String mngrLogStrt;
|
||||
private String mngrLogEnd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user