--- src/main/java/itn/com/cmm/util/MsgSendUtils.java
+++ src/main/java/itn/com/cmm/util/MsgSendUtils.java
... | ... | @@ -198,13 +198,13 @@ |
| 198 | 198 |
* @param statusResponse |
| 199 | 199 |
* @param agentSendCounts |
| 200 | 200 |
* @param sendRateList |
| 201 |
- * @param isNotified |
|
| 201 |
+ * @param isHolidayNotified |
|
| 202 | 202 |
* @return call by reference |
| 203 | 203 |
* @throws Exception |
| 204 | 204 |
*/ |
| 205 | 205 |
public static Boolean populateSendLists(MjonMsgVO mjonMsgVO, List<MjonMsgSendVO> mjonMsgSendListVO |
| 206 | 206 |
, StatusResponse statusResponse, List<String> resultSpamTxt |
| 207 |
- , Map<String, Integer> agentSendCounts, List<MjonMsgVO> sendRateList, boolean isNotified) throws Exception{
|
|
| 207 |
+ , Map<String, Integer> agentSendCounts, List<MjonMsgVO> sendRateList, boolean isHolidayNotified) throws Exception{
|
|
| 208 | 208 |
|
| 209 | 209 |
log.info(" :: populateSendLists :: ");
|
| 210 | 210 |
|
... | ... | @@ -300,7 +300,7 @@ |
| 300 | 300 |
if (!replaceYN) {
|
| 301 | 301 |
// 스팸 체크와 메시지 타입 체크 각각 한 번만 수행 |
| 302 | 302 |
if (!hasPerformedSpamCheck) {
|
| 303 |
- checkSpamAndSetStatus(mjonMsgVO, smsSpamChkTxt, resultSpamTxt, isNotified); |
|
| 303 |
+ checkSpamAndSetStatus(mjonMsgVO, smsSpamChkTxt, resultSpamTxt, isHolidayNotified); |
|
| 304 | 304 |
hasPerformedSpamCheck = true; |
| 305 | 305 |
} |
| 306 | 306 |
if (!hasPerformedMsgType) {
|
... | ... | @@ -316,7 +316,7 @@ |
| 316 | 316 |
{// 치환 문자인 경우
|
| 317 | 317 |
// 스팸 체크는 `spamChkSize`만큼 반복 수행 |
| 318 | 318 |
if (sampleCounter < spamChkSize && !"Y".equals(mjonMsgVO.getSpamStatus())) {
|
| 319 |
- checkSpamAndSetStatus(mjonMsgVO, smsSpamChkTxt, resultSpamTxt, isNotified); |
|
| 319 |
+ checkSpamAndSetStatus(mjonMsgVO, smsSpamChkTxt, resultSpamTxt, isHolidayNotified); |
|
| 320 | 320 |
sampleCounter++; |
| 321 | 321 |
} |
| 322 | 322 |
|
... | ... | @@ -422,7 +422,7 @@ |
| 422 | 422 |
sendVO.setFileCnt(mjonMsgVO.getFileCnt()); |
| 423 | 423 |
} |
| 424 | 424 |
|
| 425 |
- private static void checkSpamAndSetStatus(MjonMsgVO mjonMsgVO, String personalizedSmsTxt, List<String> resultSpamTxt, boolean isNotified) throws Exception {
|
|
| 425 |
+ private static void checkSpamAndSetStatus(MjonMsgVO mjonMsgVO, String personalizedSmsTxt, List<String> resultSpamTxt, boolean isHolidayNotified) throws Exception {
|
|
| 426 | 426 |
|
| 427 | 427 |
|
| 428 | 428 |
mjonMsgVO.setSpamStatus("N");
|
... | ... | @@ -451,7 +451,7 @@ |
| 451 | 451 |
} |
| 452 | 452 |
|
| 453 | 453 |
mjonMsgVO.setSpamStatus("Y");
|
| 454 |
- if(isNotified) {
|
|
| 454 |
+ if(isHolidayNotified) {
|
|
| 455 | 455 |
mjonMsgVO.setDelayYn("Y");
|
| 456 | 456 |
} |
| 457 | 457 |
} |
... | ... | @@ -925,7 +925,6 @@ |
| 925 | 925 |
} |
| 926 | 926 |
// SMS 텍스트를 줄 단위로 나누기 |
| 927 | 927 |
String[] split = smsTxt.split("\n");
|
| 928 |
- log.info(" : split.length :: [{}]", split.length);
|
|
| 929 | 928 |
|
| 930 | 929 |
if (split.length > 0) {
|
| 931 | 930 |
// "C" 메시지 종류인 경우 두 번째 줄, 그렇지 않으면 첫 번째 줄을 제목으로 설정 |
--- src/main/java/itn/let/mjo/mjocommon/MjonCommon.java
+++ src/main/java/itn/let/mjo/mjocommon/MjonCommon.java
... | ... | @@ -531,8 +531,9 @@ |
| 531 | 531 |
} |
| 532 | 532 |
|
| 533 | 533 |
// 스미싱 알림 처리 |
| 534 |
- private boolean handleSmishingAlert(MjonMsgVO mjonMsgVO) throws Exception {
|
|
| 534 |
+ public boolean handleSmishingAlert(MjonMsgVO mjonMsgVO) throws Exception {
|
|
| 535 | 535 |
JoinSettingVO joinSettingVO = egovSiteManagerService.selectAdminNotiDetail(); |
| 536 |
+ |
|
| 536 | 537 |
if (joinSettingVO == null || !"Y".equals(joinSettingVO.getHoliSmishingNoti()) || |
| 537 | 538 |
!"Y".equals(joinSettingVO.getSlackNoti())) {
|
| 538 | 539 |
return false; // 알림 조건 미충족 |
... | ... | @@ -543,13 +544,11 @@ |
| 543 | 544 |
List<MsgHolidayVO> holidayList = getHolidayList(); |
| 544 | 545 |
boolean isNotificationAllowed = new MjonHolidayApi().getHolidaySmishingPassStatus(alarmList, holidayList); |
| 545 | 546 |
|
| 546 |
- // 알림 발송 |
|
| 547 |
- if (!isNotificationAllowed) {
|
|
| 548 |
-// getAdminSandSlack(mjonMsgVO); |
|
| 549 |
- return true; // 알림 발송 성공 |
|
| 550 |
- } |
|
| 551 |
- |
|
| 552 |
- return false; // 알림 발송 조건 미충족 |
|
| 547 |
+ System.out.println(" :: isNotificationAllowed : "+ isNotificationAllowed);
|
|
| 548 |
+ System.out.println(" :: isNotificationAllowed : "+ isNotificationAllowed);
|
|
| 549 |
+ System.out.println(" :: isNotificationAllowed : "+ isNotificationAllowed);
|
|
| 550 |
+ System.out.println(" :: isNotificationAllowed : "+ isNotificationAllowed);
|
|
| 551 |
+ return !isNotificationAllowed; // 알림 발송 조건 미충족 |
|
| 553 | 552 |
} |
| 554 | 553 |
|
| 555 | 554 |
// 안전하게 문자열 가져오기 |
--- src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
+++ src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
... | ... | @@ -4055,9 +4055,17 @@ |
| 4055 | 4055 |
|
| 4056 | 4056 |
|
| 4057 | 4057 |
|
| 4058 |
+ |
|
| 4058 | 4059 |
|
| 4060 |
+ System.out.println("================================");
|
|
| 4059 | 4061 |
// 스팸 및 스미싱 의심이면 slack 알림 |
| 4060 |
- boolean isNotified = mjonCommon.processUserAndCheckSms(mjonMsgVO, userId); |
|
| 4062 |
+ boolean isHolidayNotified = mjonCommon.handleSmishingAlert(mjonMsgVO); |
|
| 4063 |
+ System.out.println("isNotified :: "+ isHolidayNotified);
|
|
| 4064 |
+ System.out.println("isNotified :: "+ isHolidayNotified);
|
|
| 4065 |
+ System.out.println("isNotified :: "+ isHolidayNotified);
|
|
| 4066 |
+ System.out.println("isNotified :: "+ isHolidayNotified);
|
|
| 4067 |
+ System.out.println("isNotified :: "+ isHolidayNotified);
|
|
| 4068 |
+// boolean isNotified = mjonCommon.processUserAndCheckSms(mjonMsgVO, userId); |
|
| 4061 | 4069 |
|
| 4062 | 4070 |
|
| 4063 | 4071 |
// 스팸관련 키워드 select |
... | ... | @@ -4072,7 +4080,7 @@ |
| 4072 | 4080 |
* 전송사 코드 셋팅 |
| 4073 | 4081 |
*/ |
| 4074 | 4082 |
if (!MsgSendUtils.populateSendLists(mjonMsgVO, mjonMsgSendVOList, statusResponse, resultSpamTxt, |
| 4075 |
- agentSendCounts, sendRateList, isNotified)) {
|
|
| 4083 |
+ agentSendCounts, sendRateList, isHolidayNotified)) {
|
|
| 4076 | 4084 |
; |
| 4077 | 4085 |
// 문자 치환 후 전송 문자 길이를 초과하였습니다. |
| 4078 | 4086 |
// 문자 치환 중 오류가 발생하였습니다. |
... | ... | @@ -4160,7 +4168,7 @@ |
| 4160 | 4168 |
// |
| 4161 | 4169 |
|
| 4162 | 4170 |
|
| 4163 |
- if (isNotified) {
|
|
| 4171 |
+ if (isHolidayNotified) {
|
|
| 4164 | 4172 |
System.out.println("스미싱 알림이 처리되었습니다.");
|
| 4165 | 4173 |
mjonCommon.getAdminSandSlack(mjonMsgVO); |
| 4166 | 4174 |
} else if("Y".equalsIgnoreCase(mjonMsgVO.getSpamStatus())){
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?