발송 알림 테스트
This commit is contained in:
parent
a39ec55092
commit
2e14add4e9
@ -28,6 +28,7 @@ import itn.let.mjo.msgagent.service.MjonMsgAgentStsVO;
|
||||
import itn.let.mjo.spammsg.web.ComGetSpamStringParser;
|
||||
import itn.let.sym.site.service.JoinSettingVO;
|
||||
import itn.let.uss.umt.service.MberManageVO;
|
||||
import itn.let.uss.umt.service.UserManageVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
@ -204,7 +205,7 @@ public final class MsgSendUtils {
|
||||
*/
|
||||
public static Boolean populateSendLists(MjonMsgVO mjonMsgVO, List<MjonMsgSendVO> mjonMsgSendListVO
|
||||
, StatusResponse statusResponse, List<String> resultSpamTxt
|
||||
, Map<String, Integer> agentSendCounts, List<MjonMsgVO> sendRateList, boolean isHolidayNotified) throws Exception{
|
||||
, Map<String, Integer> agentSendCounts, List<MjonMsgVO> sendRateList, boolean isHolidayNotified, String smishingYn) throws Exception{
|
||||
|
||||
log.info(" :: populateSendLists :: ");
|
||||
|
||||
@ -229,7 +230,7 @@ public final class MsgSendUtils {
|
||||
calendar.setTime(baseDate); // calendar에 baseDate 설정
|
||||
int counter = 0; // 분할 건수 카운터
|
||||
|
||||
// 데이터 모두다 스팸 체크를 안하고 건별로 갯수를 정해서 스팸체크를 한다.
|
||||
// 데이터 모두 스팸 체크를 안하고 건별로 갯수를 정해서 스팸체크를 한다.
|
||||
int spamChkSize = getSpamChkSize(mjonMsgSendListVO.size());
|
||||
int sampleCounter = 0;
|
||||
|
||||
@ -255,6 +256,9 @@ public final class MsgSendUtils {
|
||||
String msgTypeResult = null;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (MjonMsgSendVO sendVO : mjonMsgSendListVO) {
|
||||
|
||||
sendVO.setCallFrom(mjonMsgVO.getCallFrom());
|
||||
@ -329,6 +333,8 @@ public final class MsgSendUtils {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
sendVO.setSmsTxt(smsTxt);
|
||||
sendVO.setMsgType(msgTypeResult);
|
||||
|
||||
@ -350,10 +356,13 @@ public final class MsgSendUtils {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if("Y".equalsIgnoreCase(smishingYn)) {
|
||||
mjonMsgVO.setSpamStatus("Y");
|
||||
}
|
||||
|
||||
// 지연 여부 처리
|
||||
if ("Y".equalsIgnoreCase(mjonMsgVO.getDelayYn())
|
||||
if (( "Y".equalsIgnoreCase(smishingYn) || "Y".equalsIgnoreCase(mjonMsgVO.getDelayYn()))
|
||||
&& !hasPerformedDelayYn) {
|
||||
// calendar.add(Calendar.MINUTE, 30); // 모든 시간을 30분 뒤로 미룸
|
||||
// TEST
|
||||
|
||||
@ -4065,11 +4065,12 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
System.out.println("isNotified :: "+ isHolidayNotified);
|
||||
System.out.println("isNotified :: "+ isHolidayNotified);
|
||||
System.out.println("isNotified :: "+ isHolidayNotified);
|
||||
// boolean isNotified = mjonCommon.processUserAndCheckSms(mjonMsgVO, userId);
|
||||
|
||||
|
||||
// 스팸관련 키워드 select
|
||||
List<String> resultSpamTxt = mjonMsgDataService.selectSpamKeywordList();
|
||||
|
||||
UserManageVO userManageVO = mjonCommon.getUserManageInfo(userId);
|
||||
|
||||
/**
|
||||
* @methodName : populateReplacementLists
|
||||
@ -4080,7 +4081,7 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
* 전송사 코드 셋팅
|
||||
*/
|
||||
if (!MsgSendUtils.populateSendLists(mjonMsgVO, mjonMsgSendVOList, statusResponse, resultSpamTxt,
|
||||
agentSendCounts, sendRateList, isHolidayNotified)) {
|
||||
agentSendCounts, sendRateList, isHolidayNotified, userManageVO.getSmishingYn())) {
|
||||
;
|
||||
// 문자 치환 후 전송 문자 길이를 초과하였습니다.
|
||||
// 문자 치환 중 오류가 발생하였습니다.
|
||||
@ -4167,13 +4168,16 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
log.debug("총 단가 합계: [{}]", mjonMsgVO.getTotPrice());
|
||||
//
|
||||
|
||||
boolean isNotified = mjonCommon.processUserAndCheckSms(mjonMsgVO, userId);
|
||||
|
||||
if (isHolidayNotified) {
|
||||
if (isNotified) {
|
||||
System.out.println("스미싱 알림이 처리되었습니다.");
|
||||
mjonCommon.getAdminSandSlack(mjonMsgVO);
|
||||
} else if("Y".equalsIgnoreCase(mjonMsgVO.getSpamStatus())){
|
||||
System.out.println("알림 조건을 충족하지 않았습니다.");
|
||||
System.out.println("==알림 예외 시간==");
|
||||
mjonMsgDAO.insertSpamPassMsgData(mjonMsgVO);
|
||||
}else {
|
||||
System.out.println("알림 조건을 충족하지 않았습니다.");
|
||||
}
|
||||
|
||||
statusResponse.setStatus(HttpStatus.OK);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user