문자전송 로직 리펙토링 중
This commit is contained in:
parent
07800e4543
commit
b7fe16bddf
@ -3250,10 +3250,6 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||||
|
|
||||||
if(userId.equals("")) {
|
if(userId.equals("")) {
|
||||||
// Map<String, String> returnMap = new HashMap<>();
|
|
||||||
// returnMap.put("message", "로그인 후 이용이 가능합니다.");
|
|
||||||
// returnMap.put("result", "loginFail");
|
|
||||||
// returnMap.put("resultSts", resultSts);
|
|
||||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3280,6 +3276,7 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* 어디에 사용하는지 모르겠음
|
* 어디에 사용하는지 모르겠음
|
||||||
|
* set 후에 사용하는 곳이 없음
|
||||||
* //회원정보에서 스미싱 회원 여부 정보 조회
|
* //회원정보에서 스미싱 회원 여부 정보 조회
|
||||||
UserManageVO userManageVO = new UserManageVO();
|
UserManageVO userManageVO = new UserManageVO();
|
||||||
|
|
||||||
@ -3348,10 +3345,11 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//파일 갯수는 있는데 파일 경로가 없는 경우 문자발송이 안되도록 튕겨내도록 함 - 20220520 우영두
|
// 파일 갯수는 있는데 파일 경로가 없는 경우 문자발송이 안되도록 튕겨내도록 함 - 20220520 우영두
|
||||||
|
// 리펙토링 20240930 이호영
|
||||||
if(fileCount > 0) {
|
if(fileCount > 0) {
|
||||||
|
|
||||||
// if(mjonMsgVO.getFileName1() == null && mjonMsgVO.getFileName2() == null && mjonMsgVO.getFileName3() == null) {
|
//if(mjonMsgVO.getFileName1() == null && mjonMsgVO.getFileName2() == null && mjonMsgVO.getFileName3() == null) {
|
||||||
|
|
||||||
boolean allFilesAreNull = Stream.of(
|
boolean allFilesAreNull = Stream.of(
|
||||||
mjonMsgVO.getFileName1(),
|
mjonMsgVO.getFileName1(),
|
||||||
@ -3359,14 +3357,11 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
mjonMsgVO.getFileName3()
|
mjonMsgVO.getFileName3()
|
||||||
).allMatch(Objects::isNull);
|
).allMatch(Objects::isNull);
|
||||||
|
|
||||||
|
|
||||||
if (allFilesAreNull) {
|
if (allFilesAreNull) {
|
||||||
return new StatusResponse(HttpStatus.NO_CONTENT
|
return new StatusResponse(HttpStatus.NO_CONTENT
|
||||||
, "문자 메세지 이미지 추가에 오류가 발생하여 문자 발송이 취소 되었습니다."
|
, "문자 메세지 이미지 추가에 오류가 발생하여 문자 발송이 취소 되었습니다."
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3408,6 +3403,8 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
|
|
||||||
MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
|
MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
|
||||||
// 호출부에서 handleEventStatus를 호출하고 예외 처리를 추가
|
// 호출부에서 handleEventStatus를 호출하고 예외 처리를 추가
|
||||||
|
|
||||||
|
// 기존 컨트롤러 2352 라인
|
||||||
if (eventMberInfo != null) {
|
if (eventMberInfo != null) {
|
||||||
String eventEndDate = eventMberInfo.getEventEndDate();
|
String eventEndDate = eventMberInfo.getEventEndDate();
|
||||||
boolean compareEndDate = MJUtil.getCompareDate(eventEndDate);
|
boolean compareEndDate = MJUtil.getCompareDate(eventEndDate);
|
||||||
@ -3486,8 +3483,6 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
return statusResponse;
|
return statusResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 발송 처리
|
// 발송 처리
|
||||||
statusResponse = processMessageSending(mjonMsgVO, intiLists, statusResponse);
|
statusResponse = processMessageSending(mjonMsgVO, intiLists, statusResponse);
|
||||||
} else {
|
} else {
|
||||||
@ -3543,10 +3538,6 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
|
|
||||||
statusResponse.setMessage(returnMessage);
|
statusResponse.setMessage(returnMessage);
|
||||||
statusResponse.setObject(resultMap);
|
statusResponse.setObject(resultMap);
|
||||||
// modelAndView.addObject("message", returnMessage);
|
|
||||||
// modelAndView.addObject("result", returnStatus);
|
|
||||||
// modelAndView.addObject("resultSts", "0");
|
|
||||||
// modelAndView.addObject("resultBlockSts", "0");
|
|
||||||
|
|
||||||
return statusResponse;
|
return statusResponse;
|
||||||
}
|
}
|
||||||
@ -3556,10 +3547,6 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
Map<String, String> returnMap = new HashMap<String, String>();
|
Map<String, String> returnMap = new HashMap<String, String>();
|
||||||
returnMap.put("msgType", mjonMsgVO.getMsgType());
|
returnMap.put("msgType", mjonMsgVO.getMsgType());
|
||||||
returnMap.put("msgGroupId", mjonMsgVO.getMsgGroupId());
|
returnMap.put("msgGroupId", mjonMsgVO.getMsgGroupId());
|
||||||
// returnMap.put("message", returnMessage);
|
|
||||||
// returnMap.put("result", returnStatus);
|
|
||||||
// returnMap.put("resultSts", resultSts);
|
|
||||||
// returnMap.put("resultBlockSts", resultBlockSts);
|
|
||||||
|
|
||||||
|
|
||||||
statusResponse.setObject(returnMap);
|
statusResponse.setObject(returnMap);
|
||||||
@ -4273,7 +4260,7 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
|||||||
// 이벤트 상태를 종료로 변경
|
// 이벤트 상태를 종료로 변경
|
||||||
mjonEventVO.setEventInfoId(eventMberInfo.getEventInfoId());
|
mjonEventVO.setEventInfoId(eventMberInfo.getEventInfoId());
|
||||||
mjonEventVO.setEventStatus("E");
|
mjonEventVO.setEventStatus("E");
|
||||||
mjonEventVO.setEventMemo("발송 최소 금액(" + paramEachPrice + ") 부족 혹은 이벤트 종료일 초과로 종료");
|
mjonEventVO.setEventMemo("발송 최소 금액("+ paramEachPrice +") 부족 혹은 이벤트 종료일 초과되어 이벤트 종료 시킴");
|
||||||
mjonEventVO.setEventRemainCash(eventRemainCash);
|
mjonEventVO.setEventRemainCash(eventRemainCash);
|
||||||
mjonEventService.updateEventEndStatus(mjonEventVO);
|
mjonEventService.updateEventEndStatus(mjonEventVO);
|
||||||
eventMberInfo.setEventStatus("E");
|
eventMberInfo.setEventStatus("E");
|
||||||
|
|||||||
@ -3165,6 +3165,7 @@ public class MjonMsgDataController {
|
|||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
ModelMap model) throws Exception{
|
ModelMap model) throws Exception{
|
||||||
|
|
||||||
|
|
||||||
return ResponseEntity.ok().body(mjonMsgDataService.sendMsgData_advc(mjonMsgVO, request)) ;
|
return ResponseEntity.ok().body(mjonMsgDataService.sendMsgData_advc(mjonMsgVO, request)) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user