rosewiper 2024-02-01
선거문자 10만건 이상 대량 발송 개발 2차 소스 커밋
@2e8a4c0bd85d685bff138cc437e557bdccdc124e
src/main/java/itn/let/mjo/msg/service/MjonMsgVO.java
--- src/main/java/itn/let/mjo/msg/service/MjonMsgVO.java
+++ src/main/java/itn/let/mjo/msg/service/MjonMsgVO.java
@@ -206,6 +206,8 @@
 	private double failSendPrice;
 	private double totSuccSendPrice;
 	
+	private String bookmarkYn = "N";
+	
 	public String getSearchDelayMsgYn() {
 		return searchDelayMsgYn;
 	}
@@ -1638,4 +1640,10 @@
 	public void setTotSuccSendPrice(double totSuccSendPrice) {
 		this.totSuccSendPrice = totSuccSendPrice;
 	}
+	public String getBookmarkYn() {
+		return bookmarkYn;
+	}
+	public void setBookmarkYn(String bookmarkYn) {
+		this.bookmarkYn = bookmarkYn;
+	}
 }
src/main/java/itn/let/mjo/msgcampain/service/MjonCandidateService.java
--- src/main/java/itn/let/mjo/msgcampain/service/MjonCandidateService.java
+++ src/main/java/itn/let/mjo/msgcampain/service/MjonCandidateService.java
@@ -2,6 +2,8 @@
 
 import java.util.List;
 
+import itn.let.mjo.msg.service.MjonMsgVO;
+
 public interface MjonCandidateService {
 
 	// 선거문자 후보자 정보 불러오기
@@ -52,4 +54,7 @@
 		//선거문자 20건 전송 후 CallTo 상태값 전송 완료로 변경 처리
 		public int updateMsgTWCallToListSendFlag(MjonCandidateTWVO mjonCandidateTWVO) throws Exception;
 		
+		//선거문자 대량 전송 주소록 그룹 정보 조회하기
+		public List<String> selectAddrGrpHGList(MjonMsgVO mjonMsgVO) throws Exception; 
+		
 }
src/main/java/itn/let/mjo/msgcampain/service/impl/MjonCandidateDAO.java
--- src/main/java/itn/let/mjo/msgcampain/service/impl/MjonCandidateDAO.java
+++ src/main/java/itn/let/mjo/msgcampain/service/impl/MjonCandidateDAO.java
@@ -6,6 +6,7 @@
 import org.springframework.stereotype.Repository;
 
 import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
+import itn.let.mjo.msg.service.MjonMsgVO;
 import itn.let.mjo.msgcampain.service.MjonCandidateTWVO;
 import itn.let.mjo.msgcampain.service.MjonCandidateVO;
 
@@ -208,4 +209,21 @@
 		return resultCnt;
 	}
 	
+	//선거문자 대량 전송 주소록 그룹 정보 조회하기
+	@SuppressWarnings("unchecked")
+	public List<String> selectAddrGrpHGList(MjonMsgVO mjonMsgVO) throws Exception{
+		
+		List<String> resultList = new ArrayList<String>();
+		
+		try {
+			
+			resultList = (List<String>) list("mjonCandidateDAO.selectAddrGrpHGList",mjonMsgVO);
+			
+		} catch (Exception e) {
+			System.out.println("selectAddrGrpHGList DAO Error!!! " + e);
+		}
+		
+		return resultList;
+	}
+	
 }
src/main/java/itn/let/mjo/msgcampain/service/impl/MjonCandidateServiceImpl.java
--- src/main/java/itn/let/mjo/msgcampain/service/impl/MjonCandidateServiceImpl.java
+++ src/main/java/itn/let/mjo/msgcampain/service/impl/MjonCandidateServiceImpl.java
@@ -8,6 +8,7 @@
 import org.springframework.stereotype.Service;
 
 import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import itn.let.mjo.msg.service.MjonMsgVO;
 import itn.let.mjo.msgcampain.service.MjonCandidateService;
 import itn.let.mjo.msgcampain.service.MjonCandidateTWVO;
 import itn.let.mjo.msgcampain.service.MjonCandidateVO;
@@ -293,4 +294,21 @@
 		
 	}
 	
+	@Override
+	//선거문자 대량 전송 주소록 그룹 정보 조회하기
+	public List<String> selectAddrGrpHGList(MjonMsgVO mjonMsgVO) throws Exception{
+		
+		List<String> resultList = new ArrayList<String>();
+		
+		try {
+			
+			resultList = mjonCandidateDAO.selectAddrGrpHGList(mjonMsgVO);
+			
+		} catch (Exception e) {
+			System.out.println("selectAddrGrpHGList Service Imple Error!!! " + e);
+		}
+		
+		return resultList;
+	}
+	
 }
src/main/java/itn/let/mjo/msgcampain/web/MjonMsgCampainHGDataController.java
--- src/main/java/itn/let/mjo/msgcampain/web/MjonMsgCampainHGDataController.java
+++ src/main/java/itn/let/mjo/msgcampain/web/MjonMsgCampainHGDataController.java
@@ -7,6 +7,7 @@
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -16,6 +17,8 @@
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import egovframework.rte.fdl.idgnr.EgovIdGnrService;
 import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
@@ -37,11 +40,14 @@
 import itn.let.mjo.addr.service.AddrVO;
 import itn.let.mjo.event.service.MjonEventService;
 import itn.let.mjo.event.service.MjonEventVO;
+import itn.let.mjo.mjocommon.MjonCommon;
 import itn.let.mjo.msg.service.MjonMsgService;
+import itn.let.mjo.msg.service.MjonMsgVO;
 import itn.let.mjo.msgcampain.service.MjonCandidateService;
 import itn.let.mjo.msgcampain.service.MjonCandidateVO;
 import itn.let.mjo.msgdata.service.MjonMsgDataService;
 import itn.let.mjo.msgdata.service.MjonMsgDataVO;
+import itn.let.mjo.msgdata.service.MjonMsgReturnVO;
 import itn.let.mjo.pay.service.MjonPayService;
 import itn.let.mjo.spammsg.service.MjonSpamMsgService;
 import itn.let.mjo.symbol.service.MjonSymbolService;
@@ -54,6 +60,7 @@
 import itn.let.uss.umt.service.EgovMberManageService;
 import itn.let.uss.umt.service.EgovUserManageService;
 import itn.let.uss.umt.service.MberManageVO;
+import itn.let.uss.umt.service.UserManageVO;
 import itn.let.utl.fcc.service.EgovCryptoUtil;
 
 @Controller
@@ -150,7 +157,7 @@
 			, HttpServletRequest request
 			, ModelMap model) throws Exception{
 		
-String categoryType = cateCode.getCateType();
+		String categoryType = cateCode.getCateType();
 		
 		if(categoryType == null) {
 			
@@ -537,4 +544,560 @@
 		return "web/msgcampain/huge/MsgHGDataSMLView";
 	}
 	
+	
+    /**
+     * 선거문자 10만건 이상 대량 문자 발송 처리 
+     * @param searchVO
+     * @param model
+     * @return	"/web/mjon/msgcampain/huge/sendMsgHGDataAjax.do"
+     * @throws Exception
+     */
+	@RequestMapping(value= {"/web/mjon/msgcampain/huge/sendMsgHGDataAjax.do"})
+	public ModelAndView sendMsgHGDataAjax(@ModelAttribute("searchVO") MjonMsgVO mjonMsgVO, 
+			RedirectAttributes redirectAttributes, 
+			HttpServletRequest request,
+			ModelMap model) throws Exception{
+		
+		ModelAndView modelAndView = new ModelAndView();
+		modelAndView.setViewName("jsonView");
+		
+		int resultSts = 0;			//발송결과 건수
+		int resultBlockSts = 0;	//수신거부 등록번호로 발송을 안한 건수
+		
+		//로그인 권한정보 불러오기
+    	LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
+    	String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
+
+    	if(userId.equals("")) {
+    		
+    		modelAndView.addObject("result", "loginFail");
+    		modelAndView.addObject("message", "로그인이 필요합니다.");
+    		return modelAndView;
+    		
+    	}else {
+    		
+    		mjonMsgVO.setUserId(userId);
+    		
+    		/**
+    		 * 회원 정지된 상태이면 문자 발송이 안되도록 처리함
+    		 * 현재 로그인 세션도 만료 처리함
+    		 * */
+    		boolean mberSttus = userManageService.selectUserStatusInfo(userId);
+    		
+    		if(!mberSttus) {
+    			
+    			modelAndView.addObject("message", "현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 문자를 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.");
+    			modelAndView.addObject("result", "statusFail");
+    			modelAndView.addObject("resultSts", resultSts);
+    			
+    			request.getSession().invalidate();
+    			
+    			return modelAndView;
+    			
+    		}
+    		
+    	}
+    	
+    	try {
+    		
+/*+++++++++화면에서 사용하지 않는 값 디폴트 셋팅++++++++++++++*/
+    		mjonMsgVO.setDivideTime("1");
+    		mjonMsgVO.setDivideCnt("20");
+    		
+/*++++++스미싱 의심 및 문자 길이 초과 여부 체크++++++++++++++++ */    		
+        	//회원정보에서 스미싱 회원 여부 정보 조회
+        	UserManageVO userManageVO = new UserManageVO();
+        	
+        	userManageVO.setMberId(userId);
+        	UserManageVO resultUserVO = userManageService.selectSmishingYnUserInfo(userManageVO);
+        	String smishingYn = resultUserVO.getSmishingYn();
+        	mjonMsgVO.setSmishingYn(smishingYn);
+        	
+        	String charset = "euc-kr"; 						//문자 바이트 계산에 필요한 캐릭터 셋 : 한글 2Byte로 계산
+        	String smsCont = mjonMsgVO.getSmsTxt().replace("\r\n", "\n");
+        	
+        	int FrBytes = smsCont.getBytes(charset).length;
+        	
+        	if(FrBytes > 2000) {
+        		
+        		modelAndView.addObject("message", "문자 내용은 2000Byte를 넘을 수 없습니다.");
+    			modelAndView.addObject("result", "smsLengFail");
+    			return modelAndView;
+        		
+        	}
+        	
+        	
+/*++++++문자 종류(단/장/그림) 체크++++++++++++++++ */    	
+        	String msgType = mjonMsgVO.getMsgType();
+        	
+        	//내문자저장함에 저장후 문자를 발송하는경우 문자 타입이 숫자가 아닌 문자로 넘어와서 변경 처리함- 20220520 우영두
+        	if(msgType.equals("P") || msgType.equals("L")) {
+        		msgType = "6";
+        	}else if(msgType.equals("S")) {
+        		
+        		msgType = "4";
+        	}
+        	
+        	//메세지 타입이 단문이면 진짜 단문인지 한번더 확인해 준다.
+        	if(msgType.equals("4")) {
+        		
+        		//메세지 길이가 90Byte를초과 하거나, 그림 이미지가 있는경우 메세지 타입을 6으로 변경해준다.
+        		if(FrBytes > 90 || mjonMsgVO.getImgFilePath().length > 0) {
+        			
+        			msgType = "6";
+        			
+        		}
+        		
+        	}
+        	
+        	mjonMsgVO.setMsgType(msgType);
+        	
+        	//장문 메세지일 경우
+        	int fileCount = 0;
+        	if(msgType.equals("6")) {
+        		
+        		//그림 이미지가 첨부된 경우
+        		if(mjonMsgVO.getImgFilePath() != null || mjonMsgVO.getImgFilePath().length > 0) {
+        			
+        			String[] path = mjonMsgVO.getImgFilePath();
+        			String[] fileId = mjonMsgVO.getImgFileId();
+        			String[] templateYn = mjonMsgVO.getTemplateYn();
+        			
+            		for(int i=0; i<path.length; i++) {
+            			
+                		if("Y".equals(templateYn[i])) {
+            				//템플릿 사용누계 증가
+                			letterService.updateTemplateUseCount(fileId[i]);
+            			}
+                		
+                		String atchFileId = fileId[i];
+                		String imgFilePath = mjonMsgService.selectPhotoImgFileRealPath(atchFileId);
+                		
+                		// 아이하트, 현대퓨쳐넷 두 중계사는 이미지 경로는 풀패스 경로로 넘겨주면 됨
+                		if(i == 0) {
+                			
+                			mjonMsgVO.setFileName1(imgFilePath);
+                			
+                		}else if(i == 1) {
+                			
+                			mjonMsgVO.setFileName2(imgFilePath);
+                			
+                		}else {
+                			
+                			mjonMsgVO.setFileName3(imgFilePath);
+                			
+                		}
+                		fileCount ++;
+                	}
+                	
+                	//첨부파일 갯수 셋팅해주기
+                	mjonMsgVO.setFileCnt(Integer.toString(fileCount));
+        			
+        		}
+            	
+        	}
+        	
+        	//파일 갯수는 있는데 파일 경로가 없는 경우 문자발송이 안되도록 튕겨내도록 함 - 20220520 우영두
+        	if(fileCount > 0) {
+        		
+        		if(mjonMsgVO.getFileName1() == null && mjonMsgVO.getFileName2() == null && mjonMsgVO.getFileName3() == null) {
+        			
+        			modelAndView.addObject("message", "문자 메세지 이미지 추가에 오류가 발생하여 문자 발송이 취소 되었습니다.");
+    				modelAndView.addObject("result", "imgSourceFail");
+    				modelAndView.addObject("resultSts", "0");
+    				modelAndView.addObject("resultBlockSts", "0");
+    				
+    				return modelAndView; 
+        			
+        		}
+        		
+        	}
+        	
+    		System.out.println("++++++++++++ msgType ::: "+mjonMsgVO.getMsgType());
+    		
+    		
+    		/*
+        	 * 화면에서 넘어오는 단가 금액 및 총 결제 캐시 금액 체크 해주기
+        	 * 검증을 위해서 시스템 단가, 회원 협의 단가, 이벤트 단가 정보 조회
+        	 * 조회 단가를 이용하여 총 결제 캐시 금액 계산
+        	 * 파라미터로 넘어온 개별단가(eachPrice), 총 결제캐시(totPrice)를 비요하여 동일하지 않으면 컨트롤러에서 계산한 금액으로 입력해줌.
+        	 */
+        	MjonEventVO mjonEventVO = new MjonEventVO();
+    		mjonEventVO.setMberId(userId);
+    		MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
+    		
+    		//1.시스템 기본 단가 정보 불러오기
+    		JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
+    		
+    		// 등급제 단가 추출 => 시스템 단가에 적용
+    		sysJoinSetVO = mberGrdService.selectMberGrdDefaultInfo(sysJoinSetVO, userId);
+    		
+    		//2.사용자 개인 단가 정보 불러오기
+    		MberManageVO mberManageVO = new MberManageVO(); 
+    		mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
+    			
+    		//3.사용자 개인단가 정보가 0이 아니면 개인단가 사용, 없으면 시스템 기본 단가 사용
+    		Float shortPrice = mberManageVO.getShortPrice();
+    		Float longPrice = mberManageVO.getLongPrice();
+    		Float picturePrice = mberManageVO.getPicturePrice();
+    		Float picture2Price = mberManageVO.getPicture2Price();
+    		Float picture3Price = mberManageVO.getPicture3Price();
+    		
+    		//기존 소수점 2째자리에서 반올림하였으나, 정책 변경으로 소수점 버림 처리함 20220623 
+    		boolean compareEndDate = false;
+    		float eventRemainCash = 0;
+    		float paramEachPrice = Float.parseFloat(mjonMsgVO.getEachPrice());
+    		
+    		if(eventMberInfo != null) {
+    			
+    			String eventEndDate = eventMberInfo.getEventEndDate();
+    			
+    			if(eventEndDate != null) {
+    				compareEndDate = MJUtil.getCompareDate(eventEndDate);
+    				eventRemainCash = (float) eventMberInfo.getEventRemainCash();
+    				
+    				//이벤트 금액 및 기간 체크
+    				if(!compareEndDate || eventRemainCash < paramEachPrice) {
+    					
+    					if(!eventMberInfo.getEventStatus().equals("E")) {
+    						
+    						//이벤트 상태값을 종료로 변경한다.
+    						mjonEventVO.setEventInfoId(eventMberInfo.getEventInfoId());
+    						mjonEventVO.setEventStatus("E");
+    						mjonEventVO.setEventMemo("발송 최소 금액("+ paramEachPrice +") 부족 혹은 이벤트 종료일 초과되어 이벤트 종료 시킴");
+    						mjonEventVO.setEventRemainCash(eventRemainCash);
+    						mjonEventService.updateEventEndStatus(mjonEventVO);
+    						eventMberInfo.setEventStatus("E");
+    						
+    					}
+    					
+    				}
+    			}
+    		}
+    		
+    		//이벤트 진행 회원의 발송 단가 처리해주기
+    		if(eventMberInfo != null && eventMberInfo.getEventStatus().equals("Y") && compareEndDate) {
+    			
+    			shortPrice = Float.parseFloat(eventMberInfo.getEventShortPrice());
+    			longPrice = Float.parseFloat(eventMberInfo.getEventLongPrice());
+    			picturePrice = Float.parseFloat(eventMberInfo.getEventPicturePrice());
+    			picture2Price = Float.parseFloat(eventMberInfo.getEventPicture2Price());
+    			picture3Price = Float.parseFloat(eventMberInfo.getEventPicture3Price());
+    			
+    		}else if(shortPrice < 1 || longPrice < 1 || picturePrice < 1) {//협의 단가가 없는 경우 시스템 단가 적용해 주기
+    			
+    			shortPrice = (float) sysJoinSetVO.getShortPrice();
+    			longPrice = (float) sysJoinSetVO.getLongPrice();
+    			picturePrice = (float) sysJoinSetVO.getPicturePrice();
+    			picture2Price = (float) sysJoinSetVO.getPicture2Price();
+    			picture3Price = (float) sysJoinSetVO.getPicture3Price();
+    			
+    		}
+    		
+    		// 토탈금액 "," 리플레이스 처리
+    		mjonMsgVO.setTotPrice(mjonMsgVO.getTotPrice().replaceAll(",", ""));
+
+        	float tmpOrgEachPrice = Float.parseFloat(mjonMsgVO.getEachPrice());
+        	float tmpOrgTotPrice = Float.parseFloat(mjonMsgVO.getTotPrice());
+        	
+        	System.out.println("+++ tmpOrgEachPrice ::: "+tmpOrgEachPrice);
+        	System.out.println("+++ tmpOrgTotPrice ::: "+tmpOrgTotPrice);
+    		
+        	// MSG_TYPE 다시계산 
+			if(mjonMsgVO.getFileName1() != null) {
+				mjonMsgVO.setMsgType("6");
+			}else {
+				if(FrBytes < 2000) {
+					if(FrBytes > 90) {// 90Byte 초과시 장문
+						mjonMsgVO.setMsgType("6");
+					}else {// 그외 단문
+						mjonMsgVO.setMsgType("4"); 
+					}
+				}
+			}
+			
+			System.out.println("mjonMsgVO.getMsgType3() ::: "+mjonMsgVO.getMsgType());
+/*
+ * 간혹 화면에서 넘어오는 단가와 실제 문자 타입별 단가가 다르게 처리되는 부분이 있어서
+ * 다시 한번 문자 종류 및 단가 체크해서 타입별 문자 단가로 조정 처리
+ * */
+			
+        	//각 문자 종류별 단가 셋팅해주기
+    		float tmpEachPrice = 0;
+    		if(mjonMsgVO.getMsgType().equals("4")) {
+    			mjonMsgVO.setEachPrice(shortPrice.toString());
+    			tmpEachPrice = shortPrice;
+    		}else if(mjonMsgVO.getMsgType().equals("6")) {
+    			
+    			if(mjonMsgVO.getFileName3() != null) {
+    				mjonMsgVO.setEachPrice(picture3Price.toString());
+    				tmpEachPrice = picture3Price;
+    			}else if(mjonMsgVO.getFileName2() != null) {
+    				mjonMsgVO.setEachPrice(picture2Price.toString());
+    				tmpEachPrice = picture2Price;
+    			}else if(mjonMsgVO.getFileName1() != null) {
+    				mjonMsgVO.setEachPrice(picturePrice.toString());
+    				tmpEachPrice = picturePrice;
+    			}else {
+    				mjonMsgVO.setEachPrice(longPrice.toString());
+    				tmpEachPrice = longPrice;
+    			}
+    			
+    		}
+    		
+    		
+/*
+ * 주소록 그룹에서 조회한 주소 갯수 카운팅
+ * 중복 제거한 데이터 갯수 적용해주기
+ * 
+ * */    		
+    		List<String> resultAddrList =  mjonCandidateService.selectAddrGrpHGList(mjonMsgVO);
+    		
+    		if(resultAddrList == null) {
+    			
+    			modelAndView.addObject("message", "주소록 정보를 불러올 수 없습니다.");
+				modelAndView.addObject("result", "statusFail");
+				modelAndView.addObject("resultSts", "0");
+				modelAndView.addObject("resultBlockSts", "0");
+    			
+    		}
+    		
+    		int addrListLen = resultAddrList.size();
+    		int addrDupListLen = 0;
+    		
+    		//주소록 그룹 전체 주소정보 중복 제거
+    		resultAddrList = resultAddrList.stream().distinct().collect(Collectors.toList());
+    		
+    		//제거 중복 건수 계산
+    		addrDupListLen = resultAddrList.size();
+    		
+    		//수신자 총 수 * 단가 를 통해 총 결제 금액 계산
+    		int tmpTotCallCnt = addrDupListLen; //mjonMsgVO.getCallToList().length;
+    		float tmpTotPrice = tmpTotCallCnt * tmpEachPrice;
+    		
+    		
+    		//화면에서 넘어온 파라미터 개별 단가와 컨트롤러에서 계산한 단가를 비교하여 맞지 않으면 컨트롤러 계산 단가 입력
+    		if(tmpOrgEachPrice != tmpEachPrice) {
+    			mjonMsgVO.setEachPrice(Float.toString(tmpEachPrice));
+    			
+    			System.out.println("화면 : tmpOrgEachPrice ::: "+tmpOrgEachPrice);
+    			System.out.println("컨트롤러 : tmpEachPrice ::: "+tmpEachPrice);
+    		}else {
+    			System.out.println("tmpOrgEachPrice ::: "+tmpOrgEachPrice);
+    		}
+    		
+    		if(tmpOrgTotPrice != tmpTotPrice ) {
+    			mjonMsgVO.setTotPrice(Float.toString(tmpTotPrice));
+    			
+    			System.out.println("화면 : tmpOrgTotPrice ::: "+tmpOrgTotPrice);
+    			System.out.println("컨트롤러 : tmpTotPrice ::: "+tmpTotPrice);    			
+    		}else {
+    			System.out.println("tmpOrgTotPrice ::: "+tmpOrgTotPrice);
+    		}
+    		
+/*
+ * 개별단가 및  총결제 캐시 금액 체크 로직 종료
+ * 
+ * */
+    		
+
+/*
+ * 치환문자는 사용 안하므로 스킵 
+ * */
+    		
+    		
+    
+/*
+ * 사용자 현재 보유금액 및 포인트 조회 
+ * */    		
+    		
+    		//현재 고객의 보유 캐시가 문자 발송이 가능한 금액인지 체크
+        	String userMoney = mjonMsgDataService.selectBeforeCashData(mjonMsgVO);
+        	String userPoint = mjonMsgDataService.selectBeforePointData(mjonMsgVO);
+        	mjonMsgVO.setBefPoint(userPoint); //현재 보유 포인트 정보 저장
+        	String totPrice = mjonMsgVO.getTotPrice();
+        	String eachPrice = mjonMsgVO.getEachPrice();
+        	
+        	if(msgType.equals("6")) {//문자 mms, lms 단가 설정하기
+        		
+        		if(fileCount > 2) {//그림 이미지가 3개
+        			
+        			eachPrice = mjonMsgVO.getP3Price();
+        			
+        		}else if(fileCount > 1) {//그림 이미지가 2개
+        			
+        			eachPrice = mjonMsgVO.getP2Price();
+        			
+        		}else if(fileCount == 1) {//그림 이미지가 1개
+        			eachPrice = mjonMsgVO.getpPrice();
+        			
+        		}else {//장문 문자인 경우
+        			
+        			eachPrice = mjonMsgVO.getmPrice();
+        		}
+        		
+        	}
+        	
+        	BigDecimal befCash = new BigDecimal(userMoney).setScale(2, RoundingMode.HALF_EVEN);
+        	BigDecimal totMsgPrice = new BigDecimal(totPrice).setScale(2, RoundingMode.HALF_EVEN);
+    		
+    		
+    		System.out.println("++++ befCash ::: "+befCash);
+    		System.out.println("++++ totMsgPrice ::: "+totMsgPrice);
+    		
+    		
+/*+++++++++++주소록 그룹의 모든 주소록 정보 조회해오기++++++++++++++++++++++++*/
+        	
+
+        	//현재 보유 금액이 발송 문자 총 금액보다 클 경우만 문자 발송
+        	//BigDecimal 비교 연산
+        	// befCash(현재 보유금액) 값이 totMsgPrice(문자전송 금액) 보다 많으면 문자 전송	
+        	if(befCash.compareTo(totMsgPrice) != -1) { // -1 : befCash < totMsgPrice, 0 : befCash = totMsgPrice, 1 : befCash > totMsgPrice,
+        		
+        		mjonMsgVO.setBefCash(befCash.toString());
+        		
+        		//문자 전송 그룹아이디 생성
+	        	mjonMsgVO.setMsgGroupId(idgenMjonMsgGroupId.getNextStringId());
+        		
+        		int maxRow = 0;
+        		int rowCnt = 0;
+        		int i = 0;
+        		List<String> arrAddrList = new ArrayList<String>();
+        		
+        		System.out.println("++++++++++++++++++ 데이터베이스 입력 시작 ::: "+new Date());
+        		
+        		for(String callTo : resultAddrList) {
+        			
+        			arrAddrList.add(callTo);
+        			if(maxRow == 4999) {
+        				
+        				rowCnt = rowCnt + maxRow;
+        				maxRow = 0;
+        				String[] arrPhoneList = arrAddrList.toArray(new String[arrAddrList.size()]);
+        				System.out.println("arrPhoneList len ::: "+arrPhoneList.length);
+        				mjonMsgVO.setCallToList(arrPhoneList);
+        				
+        				MjonMsgReturnVO returnVO = mjonMsgDataService.insertMsgDataInfo(mjonMsgVO);
+    					mjonMsgVO.setAgentCode(returnVO.getAgentCode());
+    					resultSts = resultSts + Integer.parseInt(returnVO.getSendMsgCnt());
+    		    		resultBlockSts = resultBlockSts + Integer.parseInt(returnVO.getSendMsgBlockCnt());
+        				
+        				arrAddrList.clear();//리스트 초기화 해주기
+        				
+        				System.out.println("=========================================================================");
+    		    		System.out.println("+++++++++++++++++++++++++++++++++++++++++++선거문자 대량전송 ==> 5000 resultSts ::: " + resultSts);
+    		    		System.out.println("+++++++++++++++++++++++++++++++++++++++++++선거문자 대량전송 ==> 5000 resultBlockSts ::: " + resultBlockSts);
+    		    		System.out.println("=========================================================================");
+        				
+        			}else {
+        				
+        				maxRow++;
+        				
+        			}
+        			
+        			i++;
+        		}
+        		
+        		rowCnt = rowCnt + maxRow;
+        		
+/*
+ * loop를 돌고 남은 잔여 건수 디비 입력 처리해주기
+ * */
+        		String[] arrLastPhoneList = arrAddrList.toArray(new String[arrAddrList.size()]);
+        		
+        		mjonMsgVO.setCallToList(arrLastPhoneList);
+				
+				MjonMsgReturnVO returnVO = mjonMsgDataService.insertMsgDataInfo(mjonMsgVO);
+				mjonMsgVO.setAgentCode(returnVO.getAgentCode());
+				resultSts = resultSts + Integer.parseInt(returnVO.getSendMsgCnt());
+	    		resultBlockSts = resultBlockSts + Integer.parseInt(returnVO.getSendMsgBlockCnt());
+	    		
+	    		System.out.println("=========================================================================");
+	    		System.out.println("+++++++++++++++++++++++++++++++++++++++++++선거문자 대량전송 마지막 잔여건수 처리 ==>  resultSts ::: " + resultSts);
+	    		System.out.println("+++++++++++++++++++++++++++++++++++++++++++선거문자 대량전송 마지막 잔여건수 처리 ==>  resultBlockSts ::: " + resultBlockSts);
+	    		System.out.println("=========================================================================");
+        		
+        		System.out.println("Last arrLastPhoneList ::: "+arrLastPhoneList.length);
+        		System.out.println("req Date ::: "+ mjonMsgVO.getReqDate());
+        		System.out.println("addrDupListLen ::: "+addrDupListLen);
+        	
+        	}
+        	
+        	System.out.println("++++++++++++++++++ 데이터베이스 입력 종료 ::: "+new Date());
+        
+		} catch (Exception e) {
+			System.out.println("=========================================================================");
+			System.out.println("++++++++sendMsgHGDataAjax Controller Error!!!+++++++++++++++++++++ 선거문자 ==> 기타 시스템 오류 !!! : " + e);
+			System.out.println("=========================================================================");
+			
+    		modelAndView.addObject("result", "fail");
+    		modelAndView.addObject("message", "기타 시스템 오류 ");
+		}
+		
+    	modelAndView.addObject("message", "문자 전송이 완료되었습니다.");
+		modelAndView.addObject("result", "success");
+		modelAndView.addObject("resultSts", resultSts);
+		modelAndView.addObject("resultBlockSts", resultBlockSts);
+		
+		
+		/**
+		 * 사용자가 보낸 문자를 문자온 법인폰으로도 하나 전송하는 기능 시작
+		 * 
+		 * */
+		
+		try {
+			
+			if(resultSts > 0) {//전송 결과가 한건 이상인 경우
+				
+				String adminSmsNoticeYn = "Y";
+				String smishingYn = "N";
+				String spamStatus = mjonMsgVO.getSpamStatus(); //스미싱 의심으로 체크된 문자 정보
+				
+				UserManageVO userManageVO = new UserManageVO();
+				userManageVO.setMberId(userId);
+				if(!userId.equals("")) {
+					userManageVO = userManageService.selectAdminSmsNoticeYn(userManageVO);
+					adminSmsNoticeYn = userManageVO.getAdminSmsNoticeYn(); 
+					smishingYn = userManageVO.getSmishingYn();
+				}
+				
+				//법인폰 알림 온 이거나 스미싱의심 문자인 경우 법인폰으로 발송
+				if(adminSmsNoticeYn.equals("Y") || spamStatus.equals("Y") || smishingYn.equals("Y")) {
+
+					if(spamStatus.equals("Y")) {
+						
+						mjonMsgVO.setDelayYn("Y");
+						
+					}else if(smishingYn.equals("Y")) {
+						
+						mjonMsgVO.setSmishingYn("Y");
+					}
+					
+					// 법인폰 알람여부 체크
+					JoinSettingVO joinSettingVO = new JoinSettingVO();
+					joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
+					// SMS 체크
+					if (joinSettingVO != null && joinSettingVO.getSmsNoti().equals("Y")) {
+						MjonMsgCampainDataController mcdController = new MjonMsgCampainDataController(); 
+						mcdController.getAdminPhoneSendMsgData(mjonMsgVO);						
+					}
+
+					// SLACK 체크
+					if (joinSettingVO != null && joinSettingVO.getSlackNoti().equals("Y")) {
+						//Slack으로 메세지 전송 처리
+						MjonCommon comm = new MjonCommon();
+						comm.getAdminSandSlack(mjonMsgVO);
+					}
+				}
+				
+			}
+
+    	} catch (Exception e) {
+			throw new Exception("++++++++++++++++++++++ 선거문자 메뉴 getAdminPhoneSendMsgData Error !!! " + e);
+		}
+		
+		
+		return modelAndView;
+	}
+	
 }
src/main/resources/egovframework/sqlmap/let/msg/MjonMsgCampainData_SQL_mysql.xml
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgCampainData_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgCampainData_SQL_mysql.xml
@@ -7,6 +7,8 @@
 <sqlMap namespace="Msg">
 	<typeAlias  alias="mjonCandidateVO" type="itn.let.mjo.msgcampain.service.MjonCandidateVO"/>
 	<typeAlias  alias="mjonCandidateTWVO" type="itn.let.mjo.msgcampain.service.MjonCandidateTWVO"/>
+	<typeAlias  alias="mjonMsgVO" type="itn.let.mjo.msg.service.MjonMsgVO"/>
+	
 	
 	<select id="mjonCandidateDAO.selectCandidateDataInfo" parameterClass="String" resultClass="mjonCandidateVO">
 		
@@ -273,6 +275,32 @@
 		]]>
 	</delete>
 	
+	<select id="mjonCandidateDAO.selectAddrGrpHGList" parameterClass="mjonMsgVO" resultClass = "String">
+		
+		SELECT ADDR_PHONE_NO
+		FROM   MJ_ADDR a
+		WHERE  a.MBER_ID = #userId#
+		
+		<iterate prepend="AND ADDR_GRP_ID IN " open="(" close=")" conjunction="," property="callToList">
+			#callToList[]#
+		</iterate>
+		
+		<isEqual property="bookmarkYn" compareValue="N">
+			AND    a.BOOKMARK = 'N' 
+		</isEqual>
+		<isEqual property="bookmarkYn" compareValue="B">
+			AND    a.BOOKMARK IN ('N','Y') 
+		</isEqual>
+		<isEqual property="bookmarkYn" compareValue="Y">
+			AND    a.BOOKMARK = 'Y' 
+		</isEqual>
+		
+		AND a.DELETE_YN = 'N'
+		
+		ORDER BY a.ADDR_PHONE_NO
+		
+	</select>
+	
 </sqlMap>  
 
 
src/main/webapp/WEB-INF/jsp/web/msgcampain/addr/huge/MsgHGAddrGroupListAjax.jsp
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/addr/huge/MsgHGAddrGroupListAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/addr/huge/MsgHGAddrGroupListAjax.jsp
@@ -103,8 +103,8 @@
 		<label for="group1" class="label"></label>
 		<input type="checkbox" id="group1">
 		<!-- <p onClick="javascript:fnSelectAddrList('none','',this); return false;"> -->
-		<p>
-			<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span id="nogrpCnt"></span>명]
+		<p style="padding-left:10px;">
+			<!-- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘"> -->그룹미지정[<span id="nogrpCnt"></span>명]
 		</p>
 	</div>
 	
@@ -112,8 +112,8 @@
 		<label for="group2" class="label"></label>
 		<input type="checkbox" id="group2">
 		<!-- <p onClick="javascript:fnSelectAddrList('book','',this); return false;"> -->
-		<p>
-			<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span id="bookmarkCnt"></span>명]
+		<p style="padding-left:10px;">
+			<!-- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘"> -->자주보내는 번호[<span id="bookmarkCnt"></span>명]
 		</p>
 	</div>
 	
@@ -124,8 +124,8 @@
 					<label for="group${status.index+3}" class="label"></label>
 					<input type="checkbox" name="grpCheck" id="group${status.index+3}" value="${addrGroupList.addrGrpId}§${addrGroupList.addrGrpNm}§${addrGroupList.grpCount}">
 					<%-- <p onClick="javascript:fnSelectAddrList('grp','${addrGroupList.addrGrpId}',this); return false;"> --%>
-					<p>
-						<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">
+					<p style="padding-left:10px;">
+						<!-- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘"> -->
 						<c:out value="${addrGroupList.addrGrpNm}" />[<span><c:out value="${addrGroupList.grpCount}" /></span>명]
 					</p>
 				</div>
src/main/webapp/WEB-INF/jsp/web/msgcampain/huge/MsgHGDataSMLView.jsp
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/huge/MsgHGDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/huge/MsgHGDataSMLView.jsp
@@ -3875,7 +3875,7 @@
 		<input type="hidden" id="addrGrpNm" name="addrGrpNm" value=""/>		
 		
 		<!-- 이벤트 관련 변수 -->
-		<input type="hidden" id="eventStatus" name="eventStatus" value="<c:out value='${eventMberInfo.eventStatus}'/>"/>
+		<input type="hidden" id="eventStatus" name="eventStatus" value="E"/>
 		<input type="hidden" id="eventRemainCash" name="eventRemainCash" value="<c:out value='${eventRemainCash}'/>"/>
 		<input type="hidden" id="eventYn" name="eventYn" value="N"/>
 		
@@ -3894,7 +3894,9 @@
 		<input type="hidden" id="evnShortMsgCnt" name="evnShortMsgCnt" value="0"/><!-- 치환 이벤트 단문 건수 -->
 		<input type="hidden" id="evnLongMsgCnt" name="evnLongMsgCnt" value="0"/><!-- 치환 이벤트 장문 건수 -->
 		
-		<input type="hidden" id="divideChk" name="divideChk" value="N">
+		<!-- <input type="hidden" id="divideChk" name="divideChk" value="N"> --><!-- 분할발송 여부 -->
+		<input type="hidden" id="bookmarkYn" name="bookmarkYn" value="N"><!-- 자주사용하는 그룹 사용여버 -->
+		
 
 	<!-- <div class="top_content current" id="tab1_1"> -->
 	    <div class="heading">
@@ -4087,7 +4089,7 @@
 												<button type="button" class="btn_close" onclick="miniPopup(this);">닫기</button>
 											</div>
 										</div>
-										<div class="btn_popup_wrap convers_wrap">
+										<!-- <div class="btn_popup_wrap convers_wrap">
 									        <button type="button" class="btnType btnType7" onclick="miniPopup(this)">특정문구 일괄변환<i class="qmMark"></i></button>
 											<div class="send_miniPop convers">
 												<div>
@@ -4105,7 +4107,7 @@
 												</div>
 												<button type="button" class="btn_close" onclick="miniPopup(this);">닫기</button>
 											</div>
-										</div>
+										</div> -->
                                         <button type="button" class="btnType btnType7" onclick="javascript:fnGoMyMsg(); return false;">내문자함</button>
                                         <button type="button" class="btnType btnType8" onclick="openPhotoEditor();">이미지 불러오기</button>
 	                                    <div class="send_btnWrap">
src/main/webapp/WEB-INF/jsp/web/msgcampain/huge/MsgHGDataView.jsp
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/huge/MsgHGDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/huge/MsgHGDataView.jsp
@@ -988,44 +988,48 @@
 	
 	//수신번호 리스트 체크하기
 	var numCnt = 0;
-	/* var nameList = [];		//치환문자 이름
-	var phoneNum = [];	//받는사람
-	var rep1List = [];		//치환문자1
-	var rep2List = [];		//치환문자2
-	var rep3List = [];		//치환문자3
-	var rep4List = [];		//치환문자4 */
 	var addrGrpList = [];		//주소록 그룹 리스트
-	
 	var selectedData = tableL.getRows();
 	
 	if(selectedData == "" || selectedData == null){
-		
 		alert("주소록을 한 건 이상 추가해주세요.");
 		return false;
-	
 	}else{ // 선택한 Row '-' 문자 삭제하기
 		
+		var groupSts = false;
+		var bookSts = false;
+		
 		for(var i=0; i < selectedData.length; i++){
-			
 			//일괄변환 문자에 콤마(,)가 들어가있으면 배열로 넘길때 문제가 발생하여 특수문자(§)로 치환하여 넘겨주도록 한다.
 			var addrGrpId = tableL.getRows()[i].getData().addrGrpId;
-			
 			if(addrGrpId == ""){
-				
 				alert("수신 목록에 주소록 정보가 없습니다.");
 				return false;
-				
 			}
 			
+			if(addrGrpId == 'group1'){
+				
+				addrGrpId = '0';
+				groupSts = true;
+				
+			}else if(addrGrpId == 'bookmark'){
+				
+				addrGrpId = '0';
+				bookSts = true;
+				
+			}
 			addrGrpList[i] = addrGrpId;
+		}
+		
+		if(groupSts && bookSts){
+			
+			$("#bookmarkYn").val("B");
+			
+		}else if(bookSts){
+			
+			$("#bookmarkYn").val("Y");
 			
 		}
-	
-	}
-	
-	for(var i=0; i< addrGrpList.length; i++){
-		
-		console.log("++++++++++++ addr group id ::: "+addrGrpList[i]);
 		
 	}
 	
@@ -1063,18 +1067,14 @@
 	}
 	
 	var fileLinks = document.getElementsByName("fileLinks");
-	
 	var conLeng = conByteLeng($('#smsTxt').val()); // 내용 문자 입력 바이트 수 계산하기
 	
 	if(conLeng > 2000){
-		
 		alert("문자 내용은 2000byte를 넘을 수 없습니다.");
 		return false;
-		
 	}
 	
 	if(confirm("문자를 전송하시겠습니까?")){
-		
 
 		imgFilePath = [];
 		$('.thumb_wrap').find('.thumb_img').each(function(idx, el) {
@@ -1134,16 +1134,11 @@
 		});
 		
 		form.imgFilePath.value = imgFilePath; // 저장한 이미지 경로 담아주기
-		form.callToList.value = phoneNum; //수신자번호 리스트 저장해주기
+		form.callToList.value = addrGrpList; //수신자 주소록 그룹 리스트 저장해주기
 		form.callFrom.value = removeDash(form.callFromList.value); // 발신번호 대쉬(-) 문자 없애주기
 		form.reserveYn.value = reserYn; // 즉시 / 예약 문자 선택 여부 
 		form.templateYn.value = templateYn;
 		form.imgFileId.value = imgFileId;
-		//form.nameList.value = nameList;
-		//form.rep1List.value = rep1List;
-		//form.rep2List.value = rep2List;
-		//form.rep3List.value = rep3List;
-		//form.rep4List.value = rep4List;
 		
 		//총 결제금액 천단위 콤마 삭제 후 전송
 		var totPrice = form.totPrice.value;
@@ -1153,7 +1148,6 @@
 		//문자내용이 입력된 경우 스팸 필터링 실행
 		if(!form.smsTxtArea.value == "" && exceptSpamYn == "N"){
 			
-			console.log(smsTxtArea);
 			var spmData = new FormData(form);
 			url = "/web/mjon/msgdata/selectSpamTxtChkAjax.do";
 			
@@ -1202,390 +1196,8 @@
 			
 		}
 		
-		
-		//이벤트 진행중 회원의 경우 이벤트 잔여금액 비교 처리 필요.
-		//이벤트 캐시가 부족한 경우 이벤트 캐시로 발송 가능한 만큼만 이벤트 금액으로 발송 처리해줌.
-		//이 후 나머지 발송 건수는 이벤트 캐시가 아닌 일반 단가로 발송 처리를 진행 함.
-		var eventStatus = form.eventStatus.value;
-		
-		if(eventStatus == 'Y'){ //이벤트 진행 대상자이면 문자종류에 이벤트로 구분
-			
-			form.eventYn.value = "Y"; //이벤트문자 종류 설정
-			
-		}
-		
-		var eventRemainCash = parseFloat(form.eventRemainCash.value);
-		
-		if(eventStatus == 'Y'){
-			
-			if(parseFloat(eventRemainCash) < parseFloat(totPriceOnly)){
-				
-				if(confirm("고객님의 이벤트 캐시 잔액(" + eventRemainCash + "원) 부족으로 요청하신 문자("+numberWithCommas(phoneNum.length)+"건)를 모두 발송할 수 없습니다. 이벤트 캐시 초과 건에 대해서는 일반 단가를 적용하여 발송하시겠습니까?")){
-					
-					var smsTxtArea = $('#smsTxtArea').val();
-					var evnMsgType = $("#msgType").val();
-					var evnEachPrice = $("#eachPrice").val();	//form 에 저장된 이벤트 개별 단가 불러오기
-					var evnSendCnt = Math.floor(eventRemainCash / evnEachPrice);
-					var norEachPrice = 0;
-					var imgCnt = $("#imgCnt").val();	//그림 이미지 갯수
-					var txtReplYn = $("#txtReplYn").val();	//치환문자 포함 여부 
-					var evnPhoneNumCnt = Number($("#evnPhoneNumCnt").val());	//치환문자 체크하면서 단/장문 건수 카운팅하면서 이벤트 금액으로 발송가능한 수신자 갯수 정보
-					var myPrice = parseFloat($("#myPrice").val());	//회원보유 잔여 캐시 금액
-					
-					//수신목록 저장 배열 변수 
-					var evnPhoneNum = [];	//이벤트 단가 받는사람
-					var norPhoneNum = [];	//일반 단가 받는 사람
-					
-					//치환문자 포함 문자 저장 배열 변수(이벤트 문자 저장)
-					var evnName = [];
-					var evnRep1 = [];
-					var evnRep2 = [];
-					var evnRep3 = [];
-					var evnRep4 = [];
-					
-					//치환문자 포함 문자 저장 배열 변수(일반 문자 저장)
-					var norName = [];
-					var norRep1 = [];
-					var norRep2 = [];
-					var norRep3 = [];
-					var norRep4 = [];
-					
-					
-					/**
-					Desc:	1. 그림, 치환, 일반 문자에 대해서 각각 이벤트 단가로 전송할 리스트 와 일반단가로 전송할 리스트를 분리 하는 로직
-							2. 그림 및 일반 문자는 단순 이벤트 금액으로 보낼수 있는 건수를 계산하여 리스트[0] 부터 발송 건수만큼 추출하여 evnPhoneNum 배열에 입력 후 이벤트 금액으로 발송 진행
-							3. 이벤트 발송이 완료되면, 이벤트 건수를 제외한 나머지 건수를 norPhoneNum 배열에 입력 후 일반 금액으로 발송 진행
-							4. 일반 발송시에 전송 단가(eachPrice), 전체금액(totPrice) 등 변수 정보 변경
-							=====
-							5. 그림문자가 아닌 치환문자인 경우 치환 처리를 진행하면서 단문, 장문을 구분하고 이때 이벤트 금액에서 단문, 장문 가격을 차감하여 보낼 수량을 카운팅 함.
-							6. 치환 체크가 완료되면 치환시 나온 카운트 갯수만큼 이벤트 배열과 일반 배열에 분리처리 후 전송함.
-					Param Array : evnPhoneNum, norPhoneNum
-					function :  getNorEachPrice - 메세지 타입(msgType)에 따른 단문, 장문, 그림문자 개별 단가 금액 확인
-								sendMsgAjax 	- 문자 발송 요청 Ajax 처리
-					*/
-
-					//그림문자인 경우
-					if(imgCnt > 0){
-						
-						//이벤트 가격으로 전송 할 받는 사람 리스트 저장처리
-						for(var i=0; i< evnSendCnt; i++){
-							evnPhoneNum[i]= phoneNum[i];
-							
-							//그림문자에 치환문자가 포함된 경우
-							if(txtReplYn == 'Y'){
-								
-								evnPhoneNum[i] = phoneNum[i];
-								evnName[i] = nameList[i];
-								evnRep1[i] = rep1List[i];
-								evnRep2[i] = rep2List[i];
-								evnRep3[i] = rep3List[i];
-								evnRep4[i] = rep4List[i];
-								
-							}
-						}
-						
-						//일반 가격으로 전송 할 받는 사람 리스트 저장처리
-						for(var j=0; j < phoneNum.length - evnSendCnt; j++){
-							norPhoneNum[j]= phoneNum[j + evnSendCnt];
-							
-							//그림문자에 치환문자가 포함된 경우
-							if(txtReplYn == 'Y'){
-								
-								norPhoneNum[j]= phoneNum[j + evnSendCnt];
-								norName[j] = nameList[j + evnSendCnt];
-								norRep1[j] = rep1List[j + evnSendCnt];
-								norRep2[j] = rep2List[j + evnSendCnt];
-								norRep3[j] = rep3List[j + evnSendCnt];
-								norRep4[j] = rep4List[j + evnSendCnt];
-								
-							}
-							
-						};
-						
-					}else if(txtReplYn == 'Y'){//치환 문자가 있는 경우 , 그림문자에 치환이 있는 경우 그림문자 가격으로 발송
-						
-						//이벤트 가격으로 전송 할 받는 사람 리스트 저장처리
-						for(var i=0; i< evnPhoneNumCnt; i++){
-							evnPhoneNum[i] = phoneNum[i];
-							evnName[i] = nameList[i];
-							evnRep1[i] = rep1List[i];
-							evnRep2[i] = rep2List[i];
-							evnRep3[i] = rep3List[i];
-							evnRep4[i] = rep4List[i];
-							
-						}
-						
-						//일반 가격으로 전송 할 받는 사람 리스트 저장처리
-						for(var j=0; j < phoneNum.length - evnPhoneNumCnt; j++){
-							norPhoneNum[j]= phoneNum[j + evnPhoneNumCnt];
-							norName[j] = nameList[j + evnPhoneNumCnt];
-							norRep1[j] = rep1List[j + evnPhoneNumCnt];
-							norRep2[j] = rep2List[j + evnPhoneNumCnt];
-							norRep3[j] = rep3List[j + evnPhoneNumCnt];
-							norRep4[j] = rep4List[j + evnPhoneNumCnt];
-							
-						};
-						
-					}else{//치환문자 없는 경우 처리
-						
-						//이벤트 가격으로 전송 할 받는 사람 리스트 저장처리
-						for(var i=0; i< evnSendCnt; i++){
-							evnPhoneNum[i]= phoneNum[i];
-						}
-						
-						//일반 가격으로 전송 할 받는 사람 리스트 저장처리
-						for(var j=0; j < phoneNum.length - evnSendCnt; j++){
-							norPhoneNum[j]= phoneNum[j + evnSendCnt];
-						};
-					}
-						
-					var orgShortMsgCnt = $("#shortMsgCnt").val();	//단문 총 건수 백업
-					var orgLongMsgCnt = $("#longMsgCnt").val();		//장문 총 건수 백업
-					//이벤트 단가 문자 전송 처리 시작
-					if(evnPhoneNum.length > 0){
-						
-						form.callToList.value = evnPhoneNum; //수신자번호 리스트 저장해주기
-						form.totPrice.value = evnEachPrice * evnSendCnt;	//이벤트 단가 총 결제금액 셋팅해주기
-						form.eventStatus.value = 'Y';
-						form.eventYn.value = 'Y';
-						
-						var evnTotPrice = parseFloat(form.totPrice.value); 
-						
-						if(myPrice < evnTotPrice){
-						
-							alert("문자 발송에 필요한 회원님의 보유 잔액이 부족 합니다.");
-							return false;
-							
-						}else{
-							
-							myPrice = myPrice - evnTotPrice;
-							
-						}
-						
-						//치환문자가 있는 경우 변수 정보 담아주기(그림문자 아닌경우)
-						if(txtReplYn == 'Y' &&  imgCnt < 1){
-							
-							var evnShortMsgCnt = $("#evnShortMsgCnt").val();
-							var evnLongMsgCnt = $("#evnLongMsgCnt").val();
-							
-							form.shortMsgCnt.value = evnShortMsgCnt;
-							form.longMsgCnt.value = evnLongMsgCnt;
-							form.nameList.value = evnName;
-							form.rep1List.value = evnRep1;
-							form.rep2List.value = evnRep2;
-							form.rep3List.value = evnRep3;
-							form.rep4List.value = evnRep4;
-							
-						}else if(txtReplYn == 'Y' &&  imgCnt > 0){//치환문자가 있는 경우 변수 정보 담아주기(그림문자인 경우)
-							
-							form.nameList.value = evnName;
-							form.rep1List.value = evnRep1;
-							form.rep2List.value = evnRep2;
-							form.rep3List.value = evnRep3;
-							form.rep4List.value = evnRep4;
-							
-						}
-						
-						//이벤트 발송 실행 해주기
-						var form = document.msgForm;
-						
-						var data = new FormData(form);
-						url = "/web/mjon/msgcampain/sendMsgDataAjax.do";
-						
-						$.ajax({
-					        type: "POST",
-					        url: url,
-					        data: data,
-					        dataType:'json',
-					        async: true,
-					        processData: false,
-					        contentType: false,
-					        cache: false,
-					        success: function (returnData, status) {
-								if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
-									if("fail" == returnData.result){
-										
-										alert(returnData.message);
-										return false;
-										
-									}else if("loginFail" == returnData.result){
-										
-										alert(returnData.message);
-										return false;
-											
-									}else if("smsLengFail" == returnData.result){
-										
-										alert(returnData.message);
-										return false;
-											
-									}else if("imgSourceFail" == returnData.result){
-										
-										$('.pop_msg_fails').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
-										$('.pop_msg_fails .msg_text').html(returnData.message);
-										$('.mask').addClass('on');
-										
-									}else if("spamKeyWordFail" == returnData.result){//스팸 및 스미싱 단어가 들어간 문자 발송시 회원 이용정지 처리
-										
-										$('.pop_msg_spam').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
-										$('.pop_msg_spam .msg_text').html(returnData.message);
-										$('.mask').addClass('on');
-										
-									}else if("statusFail" == returnData.result){
-										
-										alert(returnData.message);
-										//문자발송 URL Move
-										goMsgUrlMove();
-										return false;
-										
-									}else{
-										
-										var smsCnt = returnData.resultSts;
-										var blockCnt = returnData.resultBlockSts;
-										
-										//이벤트 발송 처리가 완료 되면 나머지 일반 캐시로 발송할 문자 처리를 진행해 준다.
-										var norPhoneNumCnt = norPhoneNum.length; 
-										if(norPhoneNumCnt > 0){
-											
-											var norEachPrice = getNorEachPrice(evnMsgType); //일반 개별 단가 금액 셋팅해주기
-											
-											form.callToList.value = norPhoneNum;	//수신자번호 리스트 저장해주기
-											form.eachPrice.value =  norEachPrice;	//일반 개별 단가 금액 셋팅해주기
-											form.totPrice.value = norEachPrice * norPhoneNumCnt;	//일반 단가 총 결제 금액 셋팅해주기
-											form.sPrice.value = $("#norsPrice").val();
-											form.mPrice.value = $("#normPrice").val();
-											form.pPrice.value = $("#norpPrice").val();
-											form.p2Price.value = $("#norp2Price").val();
-											form.p3Price.value = $("#norp3Price").val();
-											form.eventStatus.value = 'N';
-											form.eventYn.value = 'N';
-											
-											var norTotPrice = parseFloat(form.totPrice.value); 
-											
-											if(myPrice < norTotPrice){
-											
-												var failMsg = "이벤트 캐시 잔액으로 발송한 문자("+smsCnt+"건)의 발송이 완료되었으나 일반 문자 발송("+norPhoneNumCnt+"건)에 필요한 회원님의 보유 잔액이 부족 합니다.";
-												
-												$('.loading_layer').removeClass('active');
-
-												$('.pop_msg_fails').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
-												$('.pop_msg_fails .msg_text').html(failMsg);
-												$('.mask').addClass('on');
-												
-												return false;
-												
-											}
-											
-											//치환문자가 있는 경우 변수 정보 담아주기(그림문자가 아닌경우)
-											if(txtReplYn == 'Y' &&  imgCnt < 1){
-												
-												//치환문자 단/장문 혼용된 경우 각 타입별 건수를 재 계산해준다.
-												//총 단/장문 각각 건수에서 이벤트로 발송한 건수를 빼준다.
-												var evnShortMsgCnt = $("#evnShortMsgCnt").val();
-												var evnLongMsgCnt = $("#evnLongMsgCnt").val();
-												
-												var shortMsgCnt = Number(orgShortMsgCnt) - Number(evnShortMsgCnt);
-												var longMsgCnt = Number(orgLongMsgCnt) - Number(evnLongMsgCnt);
-												
-												
-												//계산 값이 음수로 나오는 경우 0건으로 간주한다.
-												if(shortMsgCnt <= 0){
-													
-													shortMsgCnt = 0;
-													
-												}
-												
-												if(longMsgCnt <= 0){
-													
-													longMsgCnt = 0;
-													
-												}
-												
-												form.shortMsgCnt.value = shortMsgCnt;
-												form.longMsgCnt.value = longMsgCnt;
-												
-												form.nameList.value = norName;
-												form.rep1List.value = norRep1;
-												form.rep2List.value = norRep2;
-												form.rep3List.value = norRep3;
-												form.rep4List.value = norRep4;
-												
-											}else if(txtReplYn == 'Y' &&  imgCnt > 0){//치환문자가 있는 경우 변수 정보 담아주기(그림문자인 경우)
-												
-												form.nameList.value = norName;
-												form.rep1List.value = norRep1;
-												form.rep2List.value = norRep2;
-												form.rep3List.value = norRep3;
-												form.rep4List.value = norRep4;
-												
-											}
-											
-											
-											sendMsgAjax(smsCnt, blockCnt);
-										}
-										
-									}
-									
-								} else if(status== 'fail'){
-									alert(returnData.message);
-								}
-							},
-							beforeSend : function(xmlHttpRequest) {
-					        	//로딩창 show
-					        	$('.loading_layer').addClass('active');				
-							},	        	        
-					        complete : function(xhr, textStatus) {
-					        	//로딩창 hide
-					        	//$('.loading_layer').removeClass('active');
-							},	      			
-					        error: function (e) { alert("문자 발송에 실패하였습니다."); console.log("ERROR : ", e); }
-					    });
-						
-					}else{
-						
-						//이벤트 건수로 발송 할 수 없는 경우 일반 캐시 단가로 발송처리하기
-						if(norPhoneNum.length > 0){
-							
-							form.callToList.value = norPhoneNum; //수신자번호 리스트 저장해주기
-							form.eachPrice.value = getNorEachPrice(evnMsgType); //일반 개별 단가 금액 셋팅해주기
-							form.sPrice.value = $("#norsPrice").val();
-							form.mPrice.value = $("#normPrice").val();
-							form.pPrice.value = $("#norpPrice").val();
-							form.p2Price.value = $("#norp2Price").val();
-							form.p3Price.value = $("#norp3Price").val();
-							form.eventStatus.value = 'N';
-							form.eventYn.value = 'N';
-							
-							sendMsgAjax(0,0);
-							
-						}else{
-							
-							alert("문자 전송 중 오류가 발생하였습니다.!!");
-							return false;
-							
-						}
-						
-					}
-					
-					return false;
-				}else{
-					
-					return false;
-					
-				}
-				
-			}else{
-				
-				//발송 Ajax 호출해주기
-				sendMsgAjax(0,0);
-				
-			}
-			
-		}else{
-			
-			//발송 Ajax 호출해주기
-			sendMsgAjax(0,0);
-			
-		}
+		//발송 Ajax 호출해주기
+		sendMsgAjax(0,0);
 		
 	}
 	
@@ -1640,7 +1252,7 @@
 	var reserYn = $("#reserveYn").val();
 	
 	var data = new FormData(form);
-	url = "/web/mjon/msgcampain/sendMsgDataAjax.do";
+	url = "/web/mjon/msgcampain/huge/sendMsgHGDataAjax.do";
 	
 	$.ajax({
         type: "POST",
src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataSMLView.jsp
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataSMLView.jsp
@@ -4494,8 +4494,8 @@
 							<div class="text_preview">
 								<div class="preiew_img preViewShort"></div>
 								<div class="preview_auto">
-									<p class="none_txt">내용을 입력해주세요.222222</p>
-									<pre class="realtime">adfasfdasdf</pre>
+									<p class="none_txt">내용을 입력해주세요.</p>
+									<pre class="realtime"></pre>
 								</div>
 							</div>
 							<!-- //텍스트 미리보기 -->
Add a comment
List