fo bo 머지작업 - 오류수정

This commit is contained in:
jazz
2025-11-28 10:27:51 +09:00
parent c7fd1750dd
commit 03a5491ed2
14 changed files with 109 additions and 36 deletions

View File

@@ -131,7 +131,7 @@ public class MaEmailController {
content.put("boCtrlMap", service.selectBOMaEmailSndngListInqire(bOMaEmailSrchVO));
content.put("BOMaEmailSrchVO", bOMaEmailSrchVO);
model.addAttribute("resultSrchMap", content);
model.addAttribute("resultListMap", content);
// responseHandler.handleResponse(
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/email/selectBOMaEmailSndngListInqire", maEmailSrchVO),
// model,

View File

@@ -151,7 +151,7 @@ public class MaSmsController {
content.put("mssageMap", service.selectBOSmsSndngListInqire(bOMaMssageSrchVO));
content.put("bOMaMssageSrchVO", bOMaMssageSrchVO);
model.addAttribute("resultMap", content);
model.addAttribute("resultListMap", content);
// responseHandler.handleResponse(
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/ntcn/mssage/selectBOSmsSndngListInqire", maSmsSrchVO),
// model,

View File

@@ -214,9 +214,9 @@ public class MaStlMssageController {
// );
/*엑셀 데이터 set*/
List<Map<String, Object>> excelList = new ArrayList<>();
Map<String, Object> excelMap = (Map<String, Object>) resultMap.get("strInfo");
excelList = (List<Map<String, Object>>) excelMap.get("chargeList");
List<DataMap> excelList = new ArrayList<>();
DataMap excelMap = (DataMap) resultMap.get("strInfo");
excelList = (List<DataMap>) excelMap.get("chargeList");
//엑셀 다운로드 다운로드 시간
Date date = new Date();
@@ -231,8 +231,8 @@ public class MaStlMssageController {
BigInteger num = BigInteger.valueOf(excelList.size());
for (int i = 0; i < excelList.size(); i++) {
HashMap<String, Object> dataMap = new HashMap<>();
HashMap<String, Object> map = new HashMap<>();
map = (HashMap<String, Object>) excelList.get(i);
DataMap map = new DataMap();
map = (DataMap) excelList.get(i);
/*데이터 set*/
dataMap.put("itme01", num.subtract(BigInteger.valueOf(i)));

View File

@@ -55,9 +55,9 @@ public class MaMarktAnalsController {
*/
@Policy(AuthPolicy.RESTRICTED)
@RequestMapping(value = "/selectAdminMbrNdMlgStats")
public String selectAdminMbrMlg(ModelMap model, DataMap vo) {
public String selectAdminMbrMlg(ModelMap model) {
MarktAnalsVO mavo = new MarktAnalsVO();
DataMap vo = new DataMap();
// 응답 메세지 객체
Map<String, Object> content = new HashMap<>();

View File

@@ -173,23 +173,34 @@ public class MaAuthgrpController {
public String selectAuthGrpRegistForm(BOMaAuthgrpVO 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> srchList = new ArrayList<>();
DataMap srchMap = new DataMap();
srchMap.put("srchAuthorNm", vo.getSrchAuthorNm());
srchMap.put("srchSysDvCd", vo.getSrchSysDvCd());
srchMap.put("pageUnit", vo.getPageUnit());
srchMap.put("pageIndex", vo.getPageIndex());
srchMap.put("pageDv", vo.getPageDv());
srchList.add(srchMap);
List<DataMap> authGrlList = new ArrayList<>();
authGrlList = service.selectBOAuthGrpList(vo);
content.put("resultList", authGrlList);
if(!vo.getAuthorId().isEmpty()) {
DataMap authGrlMap = new DataMap();
authGrlMap = service.selectBOAuthGrpUpdtForm(vo);
authGrlList.add(authGrlMap);
}
content.put("paginationInfo", vo.getPaginationInfo());
// 공통코드 호출
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);
content.put("srchList", srchList);
content.put("mbrGradList", authGrlList);
content.put("paramVO", vo);
content.put("sysDvList", sysDvList);
content.put("fnctDvList", fnctDvList);
model.addAttribute("resultMap", content);
// responseHandler.handleResponse(

View File

@@ -2,6 +2,8 @@ package com.wb.domainserver.domain.admin.sys.author.controller;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.wb.domainserver.common.msg.GconeMessageSource;
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
import com.wb.domainserver.common.prop.PaginationProperties;
@@ -103,6 +105,8 @@ public class MaAuthorController {
// );
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JavaTimeModule());
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
try {
resultMap.put("cgn036", objectMapper.writeValueAsString(resultMap.get("cgn036")));

View File

@@ -74,6 +74,7 @@ public class BOFnctVO extends AbstractVO {
/* 권한메뉴기능고유번호 */
private String authorMenuFnctInnb;
private String pageDv;
}

View File

@@ -1,6 +1,8 @@
package com.wb.domainserver.domain.admin.user.mngr.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.wb.domainserver.common.msg.GconeMessageSource;
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
import com.wb.domainserver.common.prop.PaginationProperties;
@@ -110,6 +112,8 @@ public class MAJobUserController {
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserListInqireForm",vo)
// );
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JavaTimeModule());
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
try {
resultMap.put("cgn036", objectMapper.writeValueAsString(resultMap.get("cgn036")));
@@ -187,6 +191,8 @@ public class MAJobUserController {
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserRegistForm",vo)
// );
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JavaTimeModule());
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
try {
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
resultMap.put("emailCode", objectMapper.writeValueAsString(resultMap.get("emailCode")));
@@ -298,6 +304,8 @@ public class MAJobUserController {
// sendToResrc.ofPost(RESRC.GCONEBO, "/admin/user/mngr/selectBOJobUserUpdtForm",vo)
// );
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JavaTimeModule());
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
try {
resultMap.put("managerCodeList", objectMapper.writeValueAsString(resultMap.get("managerCodeList")));
resultMap.put("emailCode", objectMapper.writeValueAsString(resultMap.get("emailCode")));
@@ -594,9 +602,9 @@ public class MAJobUserController {
headerMap.put("itme08", "로그인 보안");
headerMap.put("itme09", "최종접속일시");
List<Map<String, Object>> excelList = new ArrayList<>();
List<DataMap> excelList = new ArrayList<>();
if(resultMap != null) {
excelList = (List<Map<String, Object>>) resultMap.get("excelList");
excelList = (List<DataMap>) resultMap.get("excelList");
}
//엑셀 항목에 출력될 내용 설정
@@ -605,8 +613,8 @@ public class MAJobUserController {
if(excelList != null) {
for (int i = 0; i < excelList.size(); i++ ) {
HashMap<String, Object> dataMap = new HashMap<>();
HashMap<String, Object> map = new HashMap<>();
map = (HashMap<String, Object>) excelList.get(i);
DataMap map = new DataMap();
map = excelList.get(i);
String ip2fas = "";
String fas = map.get("mblphonCrtfcAt").toString();

View File

@@ -113,4 +113,7 @@ public class BOJobUserVO extends AbstractVO {
/** 비밀번호변경 여부 */
private String mbrPwdChngAt;
// private String juscrbStrtDt;
// private String juscrbEndDt;
}

View File

@@ -354,10 +354,10 @@ public class MngrStrController {
String kakaoKey = "";
if(content.containsKey("BOMngrStrVO")){
Map<String, Object> paramVO = (Map<String, Object>) content.get("BOMngrStrVO");
BOMngrStrVO paramVO = (BOMngrStrVO) content.get("BOMngrStrVO");
if(!ObjectUtils.isEmpty(paramVO.get("sopmalCd"))){
kakaoKey = kakaoProperties.getKeyForDomain(paramVO.get("sopmalCd").toString());
if(!ObjectUtils.isEmpty(paramVO.getSopmalCd())){
kakaoKey = kakaoProperties.getKeyForDomain(paramVO.getSopmalCd().toString());
}
}

View File

@@ -4,19 +4,31 @@ import com.wb.domainserver.exception.code.ErrCode;
import com.wb.domainserver.exception.WnbtException;
import com.wb.domainserver.exception.WnbtRestException;
import com.wb.domainserver.exception.WnbtWebClientException;
import com.wb.domainserver.realm.RealmContextHolder;
import com.wb.domainserver.response.WnbtResponse;
import com.wb.domainserver.response.WnbtResponseBody;
import com.wb.domainserver.util.CookieUtils;
import io.jsonwebtoken.Header;
import io.jsonwebtoken.JwtException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.oauth2.client.ClientAuthorizationRequiredException;
import org.springframework.util.MethodInvoker;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import org.springframework.web.servlet.ModelAndView;
import java.io.IOException;
import java.util.Map;
@Slf4j
@ControllerAdvice
public class GlobalExceptionControllerAdvice {
@@ -35,14 +47,25 @@ public class GlobalExceptionControllerAdvice {
}
@ExceptionHandler(value = WnbtRestException.class)
@RequestMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<WnbtResponse> ajaxErrorHandler(HttpServletRequest req, HttpServletResponse res, WnbtRestException e){
WnbtResponse wnbtResponse = WnbtResponse.builder()
.statusCode(res.getStatus())
.requestUrl(String.valueOf(req.getRequestURL()))
.resBody(new WnbtResponseBody(e.getMessage()))
.resBody(new WnbtResponseBody(e, e.getMessage()))
.build();
return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY).body(wnbtResponse);
int errCode = 500;
if(StringUtils.hasText(e.getCode())){
errCode = Integer.parseInt(e.getCode());
}
return ResponseEntity
.status(errCode)
.contentType(MediaType.APPLICATION_JSON)
.body(wnbtResponse);
// return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY).body(wnbtResponse);
//422 : 서버가 요청을 이해하고 요청 문법도 올바르지만 요청된 지시를 따를 수 없음을 나타냄
//요청 데이터에 대해 validation 처리를 하면서 적합하지 않은 데이터를 받았을 때 반환
}
@@ -82,4 +105,25 @@ public class GlobalExceptionControllerAdvice {
return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY).body(wnbtResponse);
}
/** 해당 exception handler에 오는 경우 토큰 변조로 간주하고
* 로그아웃 처리를 위해 로그인 관련 쿠키 및 logout으로 redirect 처리하여
* 재로그인 유도
*/
@ExceptionHandler(value = JwtException.class)
public void JwtException(HttpServletRequest request, HttpServletResponse response, JwtException e) throws IOException {
log.error(e.getMessage(), e);
String realm = RealmContextHolder.getRealm().toLowerCase();
Map<String, String> cookiePath = CookieUtils.loginCookiePath();
//리프레쉬 토큰 삭제
CookieUtils.deleteCookie("RFT", cookiePath.get("RFTPath"), request, response);
//엑세스토큰 삭제
CookieUtils.deleteCookie("ACT", cookiePath.get("ACTPath"), request, response);
//토큰만료 검증쿠키 삭제
CookieUtils.deleteCookie("token_expire", cookiePath.get("ACTPath"), request, response);
response.setStatus(HttpStatus.UNAUTHORIZED.value());
response.sendRedirect("/"+realm+"/logout");
}
}

View File

@@ -27,14 +27,16 @@ public class WnbtResponseBody {
.setSerializationInclusion(JsonInclude.Include.NON_NULL); // null 값 제외
public WnbtResponseBody(Object result) {
try{
this.result = OBJECT_MAPPER.writeValueAsString(result);
} catch (JsonProcessingException e) {
log.error(e.getMessage());
throw new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
}
}
public WnbtResponseBody(WnbtRestException ex, Object result) {
this.result = result;
}