문자발송을 위한 배포

This commit is contained in:
hehihoho3@gmail.com 2024-12-04 16:22:31 +09:00
parent 77c8a48ff2
commit fc921335db
5 changed files with 28 additions and 13 deletions

View File

@ -4167,14 +4167,22 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
return statusResponse;
}
float totalPrice = MsgSendUtils.setPriceforVO(mjonMsgSendVOList);
mjonMsgVO.setTotPrice(String.valueOf(totalPrice));
if (!isCashSufficient(mjonMsgVO)) {
log.error("Insufficient balance for message sending.");
return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다.");
}
System.out.println("==================== insert 시작 ====================");
// log.info("mj_msg_data insert start [{}]", mjonMsgSendVOList.size());
float totalPrice = MsgSendUtils.setPriceforVO(mjonMsgSendVOList);
// 합산 금액을 String으로 변환하여 설정
mjonMsgVO.setTotPrice(String.valueOf(totalPrice));
// 분할 최대건수가 되면 디비에 입력하기
@ -4217,11 +4225,7 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
}
// 호출
// 스팸 스미싱 의심이면 slack 알림
boolean isNotified = mjonCommon.processUserAndCheckSms(mjonMsgVO, userId);
if (isNotified) {

View File

@ -2071,6 +2071,8 @@ function fnByteString(contents){
var adverTxt = $('.ad_txt').html();
var denyTxt = $('.deny_txt').html();
totRows = tableL.getRows().length;
//광고문자 상단 문구 줄바꿈 처리하기(문자길이 바이트수 계산을 위해서)
if(typeof adverTxt !='undefined' && adverTxt != null){
@ -2217,7 +2219,6 @@ function fnByteString(contents){
fnReplCell_advc();
}else{
var totalPrice = totalPriceSum(totRows);
$('#totalPrice').text(totalPrice);
$('#txtReplYn').val("N");

View File

@ -1048,7 +1048,10 @@ function blineSendCheck(blineCode) {
//문자발송 처리 함수
function fn_sendMsgData(){
// 타블레이터 호출
var $selectedData = tableL.getData(); // 데이터 가져오기
if(!checkConf()){ //문자온 conf-check
alert("현재 문자 발송하기 기능 점검 중입니다.\n\n1분 후 다시 시도해주세요.");
return false;
@ -1059,12 +1062,10 @@ function fn_sendMsgData(){
var userMoneyOnly = stringReplaceAll(form.myPrice.value, ",", "");
// test 주석
/*
if(parseFloat(userMoneyOnly) < parseFloat(totPriceOnly)){
alert("문자 발송에 필요한 회원님의 보유 잔액이 부족 합니다.");
return false;
}
*/
// 폼 유효성 검사
if (!validateForm(form)) return false;
@ -1081,6 +1082,11 @@ function fn_sendMsgData(){
}
}
if($selectedData.length > 300000){
alert("30만건까지 발송이 가능합니다.\n받는사람 목록을 확인해주세요.");
return false;
}
if(!confirm("문자를 전송하시겠습니까?")){
@ -1115,6 +1121,7 @@ function fn_sendMsgData(){
}
}
return false;
console.log(' !!! imgFilePath : ', imgFilePath);
// img 처리 영역
@ -1394,6 +1401,7 @@ function validateForm(form) {
// 타블레이터 호출
var $selectedData = tableL.getData(); // 데이터 가져오기
if($selectedData.length < 1){
alert("받는사람 내역을 입력해주세요.");
return false;

View File

@ -328,14 +328,15 @@ $(document).ready(function(){
|| smsTxtArea.indexOf("[*3*]") > -1
|| smsTxtArea.indexOf("[*4*]") > -1){
fnReplCell();
// fnReplCell();
}else{
//결제 금액 구하기
totalPriceSum(totRows);
// totalPriceSum(totRows);
}
totalPriceSum(totRows);
setAddrMassClose();
$('.field-selector').each(function() { $(this).val(''); });

View File

@ -1,5 +1,6 @@
function fnReplCell_advc(){
console.log(':: fnReplCell_advc :: ');
var smsTxtArea = $('#smsTxtArea').val();
console.log('smsTxtArea : ', smsTxtArea);