50건이상 발송시 안내문자 발송 관리자 on/off기능 추가

This commit is contained in:
leejunho 2025-09-10 11:03:50 +09:00
parent c664e67c59
commit fff68682bd
4 changed files with 23 additions and 15 deletions

View File

@ -796,11 +796,14 @@ private int parseIntOrDefault(String value, int defaultValue) {
public void sendMessagesIfOverFifty(int cnt, String callTo) throws Exception {
//대량문자 발송 안내 = 01
System.out.println("test");
//50건 이상일 경우만 발송
if(cnt >= 50) {
if(
cnt >= 50
&& !sysMsgTodaySendYn(callTo)
&& "Y".equals(selectSmsNotiIfOverFiftySetting())
) {
// 금일 1회 이상 보낸 이력없을 경우만 발송
if(!sysMsgTodaySendYn(callTo)) {
String sendMsgType = "01";
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String contents = "[인터넷 대량문자발송안내] 문자온에서 "+ callTo + " 번호로 " + today + "에 인터넷 대량 문자(50통 이상)가 발송되었습니다."
@ -813,7 +816,6 @@ private int parseIntOrDefault(String value, int defaultValue) {
);
}
}
}
/**
* Method Name : sendSysMsg
@ -903,6 +905,9 @@ private int parseIntOrDefault(String value, int defaultValue) {
return mjonMsgDataService.selectSysMsgTodaySendYn(sendLogVO);
}
private String selectSmsNotiIfOverFiftySetting() throws Exception {
JoinSettingVO joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
return joinSettingVO.getSmsNotiIfOverFifty();
}
}

View File

@ -4188,6 +4188,7 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
returnMap.put("resultSts", instTotalCnt);
try {
//50건이상 문자발송 안내메시지 전송
mjonCommon.sendMessagesIfOverFifty(instTotalCnt, mjonMsgVO.getCallFrom());
} catch (Exception e) {
System.out.println("sendMessagesIfOverFifty method exception.");

View File

@ -65,6 +65,7 @@ public class JoinSettingVO {
private String slackNoti; //관리자 SLACK 알림 여부
private String smishingNoti; //첫결제(카드제외) 스미싱의심 알림 여부
private String holiSmishingNoti; //야간 스미싱알림 여부
private String smsNotiIfOverFifty; //50건이상 문자발송 안내문자 발송
}

View File

@ -980,6 +980,7 @@
IFNULL(SLACK_NOTI, 'N') AS slackNoti,
IFNULL(SMISHING_NOTI, 'N') AS smishingNoti,
IFNULL(HOLI_SMISHING_NOTI, 'N') AS holiSmishingNoti,
IFNULL(SMS_NOTI_IF_OVER_FIFTY, 'N') AS smsNotiIfOverFifty,
LAST_UPDUSR_ID AS lasUpdusrId,
LAST_UPDT_PNTTM AS lastUpdtPnttm
FROM MJ_MBER_SETTING