jhleem / egov star

임종호 임종호 2022-01-27 @5


            
Index: egov3.10/src/main/java/egovframework/com/cop/sms/web/EgovSmsInfoController.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/web/EgovSmsInfoController.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/web/EgovSmsInfoController.java (nonexistent) @@ -1,191 +0,0 @@ -package egovframework.com.cop.sms.web; - -import java.util.Map; - -import javax.annotation.Resource; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.support.SessionStatus; -import org.springmodules.validation.commons.DefaultBeanValidator; - -import egovframework.com.cmm.EgovMessageSource; -import egovframework.com.cmm.LoginVO; -import egovframework.com.cmm.annotation.IncludedInfo; -import egovframework.com.cmm.util.EgovUserDetailsHelper; -import egovframework.com.cop.sms.service.EgovSmsInfoService; -import egovframework.com.cop.sms.service.Sms; -import egovframework.com.cop.sms.service.SmsVO; -import egovframework.com.utl.fcc.service.EgovStringUtil; -import egovframework.rte.fdl.property.EgovPropertyService; -import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; - -/** - * 문자메시지 서비스 컨트롤러 클래스 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.18 한성곤 최초 생성 - * 2011.8.26 정진오 IncludedInfo annotation 추가 - * - * </pre> - */ - -@Controller -public class EgovSmsInfoController { - - @Resource(name = "EgovSmsInfoService") - protected EgovSmsInfoService smsInfoService; - - @Resource(name = "propertiesService") - protected EgovPropertyService propertyService; - - @Resource(name = "egovMessageSource") - EgovMessageSource egovMessageSource; - - @Autowired - private DefaultBeanValidator beanValidator; - - //private static final Logger LOGGER = LoggerFactory.getLogger(EgovSmsInfoController.class); - - /** - * 문자메시지 목록을 조회한다. - * - * @param smsVO - * @param model - * @return - * @throws Exception - */ - @IncludedInfo(name = "문자메시지", order = 310, gid = 40) - @RequestMapping("/cop/sms/selectSmsList.do") - public String selectSmsList(@ModelAttribute("searchVO") SmsVO smsVO, ModelMap model) throws Exception { - LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); - // KISA 보안취약점 조치 (2018-12-10, 신용호) - Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); - - if(!isAuthenticated) { - return "egovframework/com/uat/uia/EgovLoginUsr"; - } - - smsVO.setUniqId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId())); - - smsVO.setPageUnit(propertyService.getInt("pageUnit")); - smsVO.setPageSize(propertyService.getInt("pageSize")); - - PaginationInfo paginationInfo = new PaginationInfo(); - - paginationInfo.setCurrentPageNo(smsVO.getPageIndex()); - paginationInfo.setRecordCountPerPage(smsVO.getPageUnit()); - paginationInfo.setPageSize(smsVO.getPageSize()); - - smsVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); - smsVO.setLastIndex(paginationInfo.getLastRecordIndex()); - smsVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); - - Map<String, Object> map = smsInfoService.selectSmsInfs(smsVO); - int totCnt = Integer.parseInt((String) map.get("resultCnt")); - - paginationInfo.setTotalRecordCount(totCnt); - - model.addAttribute("resultList", map.get("resultList")); - model.addAttribute("resultCnt", map.get("resultCnt")); - model.addAttribute("paginationInfo", paginationInfo); - - return "egovframework/com/cop/sms/EgovSmsInfoList"; - } - - /** - * 문자메시지 전송(등록)을 위한 전송 페이지로 이동한다. - * - * @param smsVO - * @param model - * @return - * @throws Exception - */ - @RequestMapping("/cop/sms/addSms.do") - public String addSms(@ModelAttribute("searchVO") SmsVO smsVO, ModelMap model) throws Exception { - - Sms sms = new Sms(); - - model.addAttribute("sms", sms); - - return "egovframework/com/cop/sms/EgovSmsInfoRegist"; - } - - /** - * 문자메시지 전송을 요청한다. - * - * @param smsVO - * @param sms - * @param bindingResult - * @param status - * @param model - * @return - * @throws Exception - */ - @RequestMapping("/cop/sms/insertSms.do") - public String insertSms(@ModelAttribute("searchVO") SmsVO smsVO, @ModelAttribute("sms") Sms sms, BindingResult bindingResult, SessionStatus status, ModelMap model) - throws Exception { - - LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); - Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); - - beanValidator.validate(sms, bindingResult); - if (bindingResult.hasErrors()) { - return "egovframework/com/cop/sms/EgovSmsInfoRegist"; - } - - // 서버 점검 추가 - /* - if (true) { - model.addAttribute("msg", "서버와의 연결이 정상적이지 않습니다."); - return "egovframework/com/cop/sms/EgovSmsInfoRegist"; - } - */ - - if (isAuthenticated) { - sms.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId())); - - smsInfoService.insertSmsInf(sms); - } - - return "forward:/cop/sms/selectSmsList.do"; - } - - /** - * 문자메시지에 대한 상세정보를 조회한다. - * - * @param smsVO - * @param model - * @return - * @throws Exception - */ - @RequestMapping("/cop/sms/selectSms.do") - public String selectSms(@ModelAttribute("searchVO") SmsVO smsVO, ModelMap model) throws Exception { - LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); - // KISA 보안취약점 조치 (2018-12-10, 신용호) - Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); - - if(!isAuthenticated) { - return "egovframework/com/uat/uia/EgovLoginUsr"; - } - - SmsVO vo = smsInfoService.selectSmsInf(smsVO); - - model.addAttribute("sessionUniqId", user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId())); - model.addAttribute("result", vo); - - return "egovframework/com/cop/sms/EgovSmsInfoDetail"; - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsBasicReceiver.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsBasicReceiver.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsBasicReceiver.java (nonexistent) @@ -1,343 +0,0 @@ -package egovframework.com.cop.sms.service.impl; - -import java.io.IOException; - -import egovframework.com.cmm.util.EgovBasicLogger; -import egovframework.com.cop.sms.service.SmsRecptn; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import x3.client.smeapi.SMEConnection; -import x3.client.smeapi.SMEConnectionFactory; -import x3.client.smeapi.SMEException; -import x3.client.smeapi.SMEListener; -import x3.client.smeapi.SMEMessage; -import x3.client.smeapi.SMEReceiver; -import x3.client.smeapi.SMEReport; -import x3.client.smeapi.SMESession; -import x3.client.smeapi.impl.SMEConfig; -import x3.client.smeapi.impl.SMEConnectionFactoryImpl; -import x3.client.smeapi.impl.SMELogger; - -/** - * 문자메시지 연동 결과 수신 처리를 위한 클래스 (프레임워크 비종속 버전) - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.11.24 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.11.24 한성곤 최초 생성 - * 2011.10.10 이기하 보안점검 후속초치(디버거코드 주석처리) - * 2017.03.07 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - * - * </pre> - */ -public class EgovSmsBasicReceiver implements SMEListener { - private SmsBasicDAO smsDao = new SmsBasicDAO(); - - private String smeConfigPath = null; - - /** SMS 서버 URL */ - private String connString = null; // ex) sme://000.000.000.000:20000 - /** SMS 연계 ID */ - private String smsId = null; - /** SMS 연계 password */ - private String smsPwd = null; - - /** SMS G/W Connection Factory */ - private SMEConnectionFactory factReceiver = null; - /** SMS G/W Connection */ - private SMEConnection connReceiver = null; - /** SMS G/W Session */ - private SMESession sessReceiver = null; - /** SMS G/W Receiver */ - private SMEReceiver receiver = null; - - /** 연결 여부 */ - private boolean isConnected = false; - - private static final Logger LOGGER = LoggerFactory.getLogger(EgovSmsBasicReceiver.class); - - /** - * SMS 결과 수신을 위한 Connection 및 Session 생성한다. - * - * @throws SMEException - */ - public void open() throws SMEException { - this.factReceiver = new SMEConnectionFactoryImpl(connString); - this.connReceiver = factReceiver.createConnection(smsId, smsPwd); // 아이디와 패스워드입니다. - this.sessReceiver = connReceiver.createSession(); - - this.receiver = sessReceiver.createReceiver(); - this.receiver.setListener(this); - this.connReceiver.start(); - - isConnected = true; - } - - /** - * SMS 결과 수신을 위한 Connection 및 Session 해제한다. - */ - public void close() { - try { - if (receiver != null) - receiver.close(); - } catch (SMEException ignore) { - LOGGER.debug(ignore.getMessage()); - } - - try { - if (sessReceiver != null) - sessReceiver.close(); - } catch (SMEException ignore) { - LOGGER.debug(ignore.getMessage()); - } - - try { - if (connReceiver != null) - connReceiver.close(); - } catch (SMEException ignore) { - LOGGER.error("Exception: {}", ignore.getClass().getName()); - LOGGER.error("Exception Message: {}", ignore.getMessage()); - } - } - - public void readPropertyFile() { - - connString = SMEConfig.getSmsUrl(); - smsId = SMEConfig.getSmsId(); - smsPwd = SMEConfig.getSmsPwd(); - - String tmp = null; - - tmp = SMEConfig.getLogLevel(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogLevel(tmp); - } - - tmp = SMEConfig.getLogLayout(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogLayout(tmp); - } - - tmp = SMEConfig.getLogPath(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogPath(tmp); - } - - SMELogger.setUseConsoleLogger(SMEConfig.getUseConsoleLogger()); - SMELogger.setUseFileLogger(SMEConfig.getUseFileLogger()); - } - - /** - * 결과에 대한 수신 처리를 한다. - */ - public void onMessage(SMEReport msg) { - if (msg instanceof SMEReport) { - if (msg.isConnected()) { - SMEReport rpt = (SMEReport) msg; - String msgId = rpt.getMessageId(); - int nRes = rpt.getResult(); // 결과코드 - String doneTime = rpt.getDeliverTime(); // 이동통신사 결과처리시간-단말기에 전달된 시간(이동통신사 생성) - String netCode = rpt.getDestination(); // 이동통신사 정보 - - //System.out.println("Receiver Number is :" + ((SMEReportImpl)rpt).receiver.activeCount()); // 주석처리 - - String resultMsg = ""; - - switch (nRes) { - case 0: - resultMsg = ""; - break; - case 4001: - resultMsg = "잘못된 전화번호; 착신 이통사를 결정할 수 없음"; - break; - case 4002: - resultMsg = "MessageID 중복"; - break; - case 4005: - resultMsg = "스팸 메시지로 처리 거부됨"; - break; - case 4006: - resultMsg = "스팸 콜백번호로 처리 거부됨"; - break; - case 5000: - resultMsg = "SMG Server 내부 에러 (인증실패,연결실패)"; - break; - case 5050: - resultMsg = "착신 이통사 연동 실패"; - break; - case 6000: - resultMsg = "이통사 시스템 장애"; - break; - case 6001: - resultMsg = "이통사 메시지 형식 오류"; - break; - case 6002: - resultMsg = "이통사 착신번호 인증 에러"; - break; - case 6003: - resultMsg = "이통사 스팸 메시지로 처리 거부됨"; - break; - case 6004: - resultMsg = "이통사 순간 전송량 제한 초과"; - break; - case 6005: - resultMsg = "이통사 월 전송량 제한 초과"; - break; - case 6006: - resultMsg = "이통사 Resource 제한에 의한 전송 제어"; - break; - case 6007: - resultMsg = "이통사 Resource full"; - break; - case 6008: - resultMsg = "이통사 번호이동 시스템 장애"; - break; - case 6009: - resultMsg = "이통사 메시지 타입 오류"; - break; - case 6010: - resultMsg = "이통사 전송 실패"; - break; - case 6011: - resultMsg = "이통사 메시지 전송불가(단말기에서 착신 거부)"; - break; - case 6012: - resultMsg = "이통사 전송 실패(무선망단)"; - break; - case 6013: - resultMsg = "이통사 전송 실패(무선망 -> 단말기단)"; - break; - case 6014: - resultMsg = "이통사 수신 단말기 형식 오류"; - break; - case 6015: - resultMsg = "이통사 Unknown Error"; - break; - case 7000: - resultMsg = "수신 단말기 전원꺼짐"; - break; - case 7001: - resultMsg = "수신 단말기 메시지 버퍼 풀"; - break; - case 7002: - resultMsg = "수신 단말기 음영지역"; - break; - case 7003: - resultMsg = "수신 단말기 메시지 삭제됨"; - break; - default: - resultMsg = "알 수 없는 오류 발생"; - } - - if (nRes != SMEMessage.RESULT_SUCCESS) { - // System.out.println("SMSMessage (msgId = " + msgId + ") report = " + rpt.getResult()); - LOGGER.info("MessageId : {}", msgId); - LOGGER.info("Result : {}", nRes); - LOGGER.info("Result Msg. : {}", resultMsg); - LOGGER.info("Done Time : {}", doneTime); - LOGGER.info("Net Code : {}", netCode); - } else { - // System.out.println("SMEMessage (msgId = " + msgId + ") report = " + rpt.getResult()); - LOGGER.info("MessageId : {}", msgId); - LOGGER.info("Result : {}", nRes); - LOGGER.info("Result Msg. : {}", resultMsg); - LOGGER.info("Done Time : {}", doneTime); - LOGGER.info("Net Code : {}", netCode); - } - - // Spring context에서 호출된 경우만 DB를 처리함 - if (smeConfigPath != null) { - SmsRecptn recptn = new SmsRecptn(); - - recptn.setSmsId(msgId.substring(0, 20)); // SMS_ID + "-" + 수신전화번호 - recptn.setRecptnTelno(msgId.substring(21)); // "-" 제외 - - recptn.setResultCode(Integer.toString(nRes)); - recptn.setResultMssage(resultMsg); - - try { - smsDao.updateSmsRecptnInf(recptn); - //2017.02.08 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - } catch (IOException ex) { -// LOGGER.error("Exception: {}", ex.getClass().getName()); -// LOGGER.error("Exception Message: {}", ex.getMessage()); - LOGGER.error("[IOException] : Connection Close"); - } catch (Exception ex) { - LOGGER.error("["+ ex.getClass() +"] Connection Close : ", ex.getMessage()); - } - } - } else { - LOGGER.debug("SMEReceiver Disconnected!!"); - isConnected = false; - } - } - } - - /** - * 결과 수신을 위한 daemon을 기동한다. - * - * @param args - */ - public static void mainExample(String[] args) { - if (args.length < 1) { - LOGGER.error("SMEConfig.conf file full path needed."); - LOGGER.error("ex) java [JVM Options] [className] /home/egovframe/conf/SMEConfig.conf"); - System.exit(-1); - } - - EgovSmsBasicReceiver receiver = new EgovSmsBasicReceiver(); - - try { - try { - SMEConfig.configSet(args[0]); - receiver.readPropertyFile(); - - } catch (Exception ex) { -// LOGGER.error("DEBUG: {}", ex.getMessage()); - //2017.03.07 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - LOGGER.error("["+ ex.getClass() +"] : Connection Close ", ex.getMessage()); - return; - } - - // 결과 수신을 위해서 리포트 세션을 접속한다. - // 프로그램 시작시 최초 한번만 해준다. - receiver.open(); - - long startTimestamp = System.currentTimeMillis(); - long nowTimestamp = 0; - long limitTimeInterval = (60)*60*1000; //60분간으로 제한 - - // 데몬이 종료안되도록 10초씩 쉬면서 루프를 돌렸습니다. - // 실제 사용 목적에 맞게끔 고쳐주시면 됩니다. - while (true) { - // 연결을 유지해야하는데 서버측에서 세션을 끊어버리거나 - // 네트워크 간섭 또는 장애 상황으로 연결이 끊겼을 경우 재접속할 수 있도록 처리 - //if (receiver.isConnected == false) { - if (!receiver.isConnected) { // recommended by PMD - receiver.close(); - Thread.sleep(10000); - receiver.open(); - } - - Thread.sleep(10000); - nowTimestamp = System.currentTimeMillis(); - if ( (nowTimestamp - startTimestamp) > limitTimeInterval) break; - } - - } catch (SMEException ex) { - LOGGER.error("DEBUG: {}", ex.getMessage()); - } catch (InterruptedException ie) { - EgovBasicLogger.ignore("InterruptedException", ie); - } finally { - receiver.close(); - } - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoReceiver.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoReceiver.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoReceiver.java (nonexistent) @@ -1,411 +0,0 @@ -package egovframework.com.cop.sms.service.impl; - -import egovframework.com.cmm.service.EgovProperties; -import egovframework.com.cmm.util.EgovBasicLogger; -import egovframework.com.cop.sms.service.SmsRecptn; -import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -import x3.client.smeapi.SMEConnection; -import x3.client.smeapi.SMEConnectionFactory; -import x3.client.smeapi.SMEException; -import x3.client.smeapi.SMEListener; -import x3.client.smeapi.SMEMessage; -import x3.client.smeapi.SMEReceiver; -import x3.client.smeapi.SMEReport; -import x3.client.smeapi.SMESession; -import x3.client.smeapi.impl.SMEConfig; -import x3.client.smeapi.impl.SMEConnectionFactoryImpl; -import x3.client.smeapi.impl.SMELogger; - -/** - * 문자메시지 연동 결과 수신 처리를 위한 클래스 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.08.05 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.08.05 한성곤 최초 생성 - * 2011.10.10 이기하 보안점검 후속초치(디버거코드 주석처리) - * 2016-02-13 이정은 시큐어코딩(ES) - 시큐어코딩 부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - * </pre> - */ -@Service("EgovSmsInfoReceiver") -public class EgovSmsInfoReceiver extends EgovAbstractServiceImpl implements SMEListener { - @Resource(name = "SmsDAO") - private SmsDAO smsDao; - - private String smeConfigPath = null; - - /** SMS 서버 URL */ - private String connString = null; // ex) sme://000.000.000.000:20000 - /** SMS 연계 ID */ - private String smsId = null; - /** SMS 연계 password */ - private String smsPwd = null; - - /** SMS G/W Connection Factory */ - private SMEConnectionFactory factReceiver = null; - /** SMS G/W Connection */ - private SMEConnection connReceiver = null; - /** SMS G/W Session */ - private SMESession sessReceiver = null; - /** SMS G/W Receiver */ - private SMEReceiver receiver = null; - - /** 연결 여부 */ - private boolean isConnected = false; - - private static final Logger LOGGER = LoggerFactory.getLogger(EgovSmsInfoReceiver.class); - - /** - * SMS 결과 수신을 위한 Connection 및 Session 생성한다. - * - * @throws SMEException - */ - public void open() throws SMEException { - this.factReceiver = new SMEConnectionFactoryImpl(connString); - this.connReceiver = factReceiver.createConnection(smsId, smsPwd); // 아이디와 패스워드입니다. - this.sessReceiver = connReceiver.createSession(); - - this.receiver = sessReceiver.createReceiver(); - this.receiver.setListener(this); - this.connReceiver.start(); - - this.isConnected = true; - } - - /** - * SMS 결과 수신을 위한 Connection 및 Session 해제한다. - */ - public void close() { - try { - if (receiver != null) - receiver.close(); - } catch (SMEException ignore) { - EgovBasicLogger.ignore("Receiver close error"); - } - - try { - if (sessReceiver != null) - sessReceiver.close(); - } catch (SMEException ignore) { - EgovBasicLogger.ignore("Session Receiver close error"); - } - - try { - if (connReceiver != null) - connReceiver.close(); - } catch (SMEException ignore) { - EgovBasicLogger.ignore("Connection Receiver close error"); - } - } - - public void readPropertyFile() { - - this.connString = SMEConfig.getSmsUrl(); - this.smsId = SMEConfig.getSmsId(); - this.smsPwd = SMEConfig.getSmsPwd(); - - String tmp = null; - - tmp = SMEConfig.getLogLevel(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogLevel(tmp); - // System.out.println(tmp); - } - - tmp = SMEConfig.getLogLayout(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogLayout(tmp); - // System.out.println(tmp); - } - - tmp = SMEConfig.getLogPath(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogPath(tmp); - // System.out.println(tmp); - } - - SMELogger.setUseConsoleLogger(SMEConfig.getUseConsoleLogger()); - SMELogger.setUseFileLogger(SMEConfig.getUseFileLogger()); - } - - /** - * 결과에 대한 수신 처리를 한다. - */ - public void onMessage(SMEReport msg) { - if (msg instanceof SMEReport) { - if (msg.isConnected()) { - SMEReport rpt = (SMEReport) msg; - String msgId = rpt.getMessageId(); - int nRes = rpt.getResult(); // 결과코드 - String doneTime = rpt.getDeliverTime(); // 이동통신사 결과처리시간-단말기에 전달된 시간(이동통신사 생성) - String netCode = rpt.getDestination(); // 이동통신사 정보 - - //System.out.println("Receiver Number is :" + ((SMEReportImpl)rpt).receiver.activeCount()); // 주석처리 - - String resultMsg = ""; - - switch (nRes) { - case 0: - resultMsg = ""; - break; - case 4001: - resultMsg = "잘못된 전화번호; 착신 이통사를 결정할 수 없음"; - break; - case 4002: - resultMsg = "MessageID 중복"; - break; - case 4005: - resultMsg = "스팸 메시지로 처리 거부됨"; - break; - case 4006: - resultMsg = "스팸 콜백번호로 처리 거부됨"; - break; - case 5000: - resultMsg = "SMG Server 내부 에러 (인증실패,연결실패)"; - break; - case 5050: - resultMsg = "착신 이통사 연동 실패"; - break; - case 6000: - resultMsg = "이통사 시스템 장애"; - break; - case 6001: - resultMsg = "이통사 메시지 형식 오류"; - break; - case 6002: - resultMsg = "이통사 착신번호 인증 에러"; - break; - case 6003: - resultMsg = "이통사 스팸 메시지로 처리 거부됨"; - break; - case 6004: - resultMsg = "이통사 순간 전송량 제한 초과"; - break; - case 6005: - resultMsg = "이통사 월 전송량 제한 초과"; - break; - case 6006: - resultMsg = "이통사 Resource 제한에 의한 전송 제어"; - break; - case 6007: - resultMsg = "이통사 Resource full"; - break; - case 6008: - resultMsg = "이통사 번호이동 시스템 장애"; - break; - case 6009: - resultMsg = "이통사 메시지 타입 오류"; - break; - case 6010: - resultMsg = "이통사 전송 실패"; - break; - case 6011: - resultMsg = "이통사 메시지 전송불가(단말기에서 착신 거부)"; - break; - case 6012: - resultMsg = "이통사 전송 실패(무선망단)"; - break; - case 6013: - resultMsg = "이통사 전송 실패(무선망 -> 단말기단)"; - break; - case 6014: - resultMsg = "이통사 수신 단말기 형식 오류"; - break; - case 6015: - resultMsg = "이통사 Unknown Error"; - break; - case 7000: - resultMsg = "수신 단말기 전원꺼짐"; - break; - case 7001: - resultMsg = "수신 단말기 메시지 버퍼 풀"; - break; - case 7002: - resultMsg = "수신 단말기 음영지역"; - break; - case 7003: - resultMsg = "수신 단말기 메시지 삭제됨"; - break; - default: - resultMsg = "알 수 없는 오류 발생"; - } - - if (nRes != SMEMessage.RESULT_SUCCESS) { - //System.out.println("SMSMessage (msgId = " + msgId + ") report = " + rpt.getResult()); - LOGGER.info("MessageId : {}", msgId); - LOGGER.info("Result : {}", nRes); - LOGGER.info("Result Msg. : {}", resultMsg); - LOGGER.info("Done Time : {}", doneTime); - LOGGER.info("Net Code : {}", netCode); - } else { - //System.out.println("SMEMessage (msgId = " + msgId + ") report = " + rpt.getResult()); - LOGGER.info("MessageId : {}", msgId); - LOGGER.info("Result : {}", nRes); - LOGGER.info("Result Msg. : {}", resultMsg); - LOGGER.info("Done Time : {}", doneTime); - LOGGER.info("Net Code : {}", netCode); - } - - // Spring context에서 호출된 경우만 DB를 처리함 - if (smeConfigPath != null) { - SmsRecptn recptn = new SmsRecptn(); - - recptn.setSmsId(msgId.substring(0, 20)); // SMS_ID + "-" + 수신전화번호 - recptn.setRecptnTelno(msgId.substring(21)); // "-" 제외 - - recptn.setResultCode(Integer.toString(nRes)); - recptn.setResultMssage(resultMsg); - - try { - smsDao.updateSmsRecptnInf(recptn); - //2017.02.08 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - } catch (IllegalArgumentException ex) { - LOGGER.error("[IllegalArgumentException] : Connection Close"); - } catch (Exception ex) { - LOGGER.error("["+ ex.getClass() +"] Connection Close : ", ex.getMessage()); - } - } - } else { - //System.out.println("SMEReceiver Disconnected!!"); // 주석처리 - LOGGER.debug("SMEReceiver Disconnected!!"); - this.isConnected = false; - } - } - } - - /** - * 결과 수신을 위한 daemon을 기동한다. - * - * @param args - */ - public static void mainExample(String[] args) { - - if (args.length < 1) { - LOGGER.error("SMEConfig.conf file full path needed."); - LOGGER.error("ex) java [JVM Options] [className] /home/egovframe/conf/SMEConfig.conf"); - System.exit(-1); - } - - EgovSmsInfoReceiver receiver = new EgovSmsInfoReceiver(); - - try { - try { - SMEConfig.configSet(args[0]); - receiver.readPropertyFile(); - - } catch (Exception ex) { - LOGGER.error("["+ ex.getClass() +"] : ", ex.getMessage()); - return; - } - - // 결과 수신을 위해서 리포트 세션을 접속한다. - // 프로그램 시작시 최초 한번만 해준다. - receiver.open(); - - // 데몬이 종료안되도록 10초씩 쉬면서 루프를 돌렸습니다. - // 실제 사용 목적에 맞게끔 고쳐주시면 됩니다. - //KISA 보안약점 조치 (2018-10-29, 윤창원) - while (true) { - // 연결을 유지해야하는데 서버측에서 세션을 끊어버리거나 - // 네트워크 간섭 또는 장애 상황으로 연결이 끊겼을 경우 재접속할 수 있도록 처리 - //if (receiver.isConnected == false) { - if (!receiver.isConnected) { // recommended by PMD - receiver.close(); - Thread.sleep(10000); - - try{ - receiver.open(); - - } catch (SMEException ex) { - LOGGER.error("DEBUG: {}", ex.getMessage()); - break; - } - } - - Thread.sleep(10000); - } - - } catch (SMEException ex) { - LOGGER.error("DEBUG: {}", ex.getMessage()); - } catch (InterruptedException ie) { - EgovBasicLogger.ignore("InterruptedException", ie); - } finally { - receiver.close(); - } - } - - /** - * Scheduler 등을 통해 호출되는 처리를 담당한다. - * Spring(Quartz)에서 제공하는 MethodInvokingJobDetailFactoryBean 사용으로 호출된다. - * 관련 설정은 context-schedule.xml 참조 - */ - public void execute() { - this.smeConfigPath = EgovProperties.getPathProperty("Globals.SMEConfigPath"); - - LOGGER.debug("EgovSmsInfoReceiver executed..."); - - try { - try { - SMEConfig.configSet(smeConfigPath); - readPropertyFile(); - - } catch (Exception ex) { - LOGGER.error("["+ ex.getClass() +"] : ", ex.getMessage()); - return; - } - - //---------------------------------- - // 데몬 형식으로 변경 - //---------------------------------- - //// 연결이 진행 중이면 현 job 종료 - //if (isConnected) { - // return; - //} - - //close(); - //Thread.sleep(1000); - //open(); - - open(); - - //KISA 보안약점 조치 (2018-10-29, 윤창원) - while (true) { - if (!isConnected) { - close(); - Thread.sleep(10000); - - try { - open(); - } catch (SMEException ex) { - LOGGER.error("DEBUG: {}", ex.getMessage()); - break; - } - } - - Thread.sleep(10000); - } - ////-------------------------------- - - } catch (SMEException ex) { - LOGGER.error("Exception: {}", ex.getClass().getName()); - LOGGER.error("Exception Message: {}", ex.getMessage()); - } catch (InterruptedException ie) { - EgovBasicLogger.ignore("InterruptedException", ie); - } finally { - close(); - } - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsBasicDAO.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsBasicDAO.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsBasicDAO.java (nonexistent) @@ -1,510 +0,0 @@ -package egovframework.com.cop.sms.service.impl; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; - -import egovframework.com.cop.sms.service.Sms; -import egovframework.com.cop.sms.service.SmsRecptn; -import egovframework.com.cop.sms.service.SmsVO; - -/** - * 문자메시지를 위한 데이터 접근 클래스 (프레임워크 비종속 버전) - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.11.24 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.11.24 한성곤 최초 생성 - * - * </pre> - */ -public class SmsBasicDAO { - /** - * 문자메시지 목록을 조회한다. - * - * @param SmsVO - */ - public List<SmsVO> selectSmsInfs(SmsVO vo) throws Exception { - List<SmsVO> list = new ArrayList<SmsVO>(); - - //variables - Connection conn = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql - buffer.append("SELECT\n"); - buffer.append(" a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN,\n"); - buffer.append(" (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT,\n"); - buffer.append(" DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i:%S') as FRST_REGIST_PNTTM\n"); - buffer.append("FROM COMTNSMS a\n"); - buffer.append("WHERE 1=1\n"); - - if ("0".equals(vo.getSearchCnd())) { - if (!"".equals(vo.getSearchWrd())) { - buffer.append(" AND a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', ?,'%'))\n"); - } - } else if ("1".equals(vo.getSearchCnd())) { - buffer.append(" AND a.TRNSMIS_CN LIKE CONCAT ('%', #searchWrd#,'%')\n"); - } - - buffer.append("ORDER BY a.FRST_REGIST_PNTTM DESC\n"); - buffer.append("LIMIT ? OFFSET ?"); - - // for Oracle - /* - buffer.append("SELECT * FROM ( SELECT rownum rn, TB.* FROM (\n"); - buffer.append("SELECT\n"); - buffer.append(" a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN,\n"); - buffer.append(" (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT,\n"); - buffer.append(" TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM\n"); - buffer.append("FROM COMTNSMS a\n"); - buffer.append("WHERE 1=1\n"); - - if ("0".equals(vo.getSearchCnd())) { - if (!"".equals(vo.getSearchWrd())) { - buffer.append(" AND a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || ? || '%')\n"); - } - } else if ("1".equals(vo.getSearchCnd())) { - buffer.append(" AND a.TRNSMIS_CN LIKE '%' || ? || '%'\n"); - } - - buffer.append("ORDER BY a.FRST_REGIST_PNTTM DESC\n"); - buffer.append(") TB ) WHERE rn BETWEEN ? + 1 AND ? + ?"); - */ - - conn = SmsBasicDBUtil.getConnection(); - - pstmt = conn.prepareStatement(buffer.toString()); - - int index = 0; - - if ("0".equals(vo.getSearchCnd())) { - if (!"".equals(vo.getSearchWrd())) { - pstmt.setString(++index, vo.getSearchWrd()); - } - } else if ("1".equals(vo.getSearchCnd())) { - pstmt.setString(++index, vo.getSearchWrd()); - } - - // for mySql - pstmt.setInt(++index, vo.getRecordCountPerPage()); - pstmt.setInt(++index, vo.getFirstIndex()); - - // for Oracle - /* - pstmt.setInt(++index, vo.getFirstIndex()); - pstmt.setInt(++index, vo.getFirstIndex()); - pstmt.setInt(++index, vo.getRecordCountPerPage()); - */ - - rs = pstmt.executeQuery(); - - SmsVO result = null; - - while (rs.next()) { - result = new SmsVO(); - - result.setSmsId(rs.getString("SMS_ID")); - result.setTrnsmitTelno(rs.getString("TRNSMIS_TELNO")); - result.setTrnsmitCn(rs.getString("TRNSMIS_CN")); - result.setRecptnCnt(rs.getInt("RECPTN_CNT")); - result.setFrstRegisterPnttm(rs.getString("FRST_REGIST_PNTTM")); - - list.add(result); - } - - return list; - - } finally { - SmsBasicDBUtil.close(rs, pstmt, conn); - } - } - - /** - * 문자메시지 목록 숫자를 조회한다 - * - * @param SmsVO - * @return - * @throws Exception - */ - public int selectSmsInfsCnt(SmsVO vo) throws Exception { - //variables - Connection conn = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql - buffer.append("SELECT\n"); - buffer.append(" COUNT(a.SMS_ID) as cnt\n"); - buffer.append("FROM COMTNSMS a\n"); - buffer.append("WHERE 1=1\n"); - - if ("0".equals(vo.getSearchCnd())) { - if (!"".equals(vo.getSearchWrd())) { - buffer.append(" AND a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', ?,'%'))\n"); - } - } else if ("1".equals(vo.getSearchCnd())) { - buffer.append(" AND a.TRNSMIS_CN LIKE CONCAT ('%', #searchWrd#,'%')\n"); - } - - // for Oracle - /* - buffer.append("SELECT\n"); - buffer.append(" COUNT(a.SMS_ID) as cnt\n"); - buffer.append("FROM COMTNSMS a\n"); - buffer.append("WHERE 1=1\n"); - - if ("0".equals(vo.getSearchCnd())) { - if (!"".equals(vo.getSearchWrd())) { - buffer.append(" AND a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || ? || '%')\n"); - } - } else if ("1".equals(vo.getSearchCnd())) { - buffer.append(" AND a.TRNSMIS_CN LIKE '%' || ? || '%'\n"); - } - */ - - conn = SmsBasicDBUtil.getConnection(); - - pstmt = conn.prepareStatement(buffer.toString()); - - int index = 0; - - if ("0".equals(vo.getSearchCnd())) { - if (!"".equals(vo.getSearchWrd())) { - pstmt.setString(++index, vo.getSearchWrd()); - } - } else if ("1".equals(vo.getSearchCnd())) { - pstmt.setString(++index, vo.getSearchWrd()); - } - - rs = pstmt.executeQuery(); - - if (rs.next()) { - return rs.getInt("cnt"); - } - - return 0; - - } finally { - SmsBasicDBUtil.close(rs, pstmt, conn); - } - } - - /** - * 문자메시지 정보를 등록한다. - * - * @param notification - * @return - * @throws Exception - */ - public String insertSmsInf(Sms sms) throws Exception { - String smsId = null; - - //variables - Connection conn = null; - PreparedStatement pstmt = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql - buffer.append("INSERT INTO COMTNSMS\n"); - buffer.append(" (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN,\n"); - buffer.append(" FRST_REGISTER_ID, FRST_REGIST_PNTTM )\n"); - buffer.append("VALUES\n"); - buffer.append("(?, ?, ?, ?, SYSDATE())"); - - // for Oracle - /* - buffer.append("INSERT INTO COMTNSMS\n"); - buffer.append(" (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN,\n"); - buffer.append(" FRST_REGISTER_ID, FRST_REGIST_PNTTM )\n"); - buffer.append("VALUES\n"); - buffer.append("(?, ?, ?, ?, SYSDATE)"); - */ - - conn = SmsBasicDBUtil.getConnection(); - - conn.setAutoCommit(false); - - smsId = getNextId(conn); // SMS_ID 생성... - - pstmt = conn.prepareStatement(buffer.toString()); - - int index = 0; - - pstmt.setString(++index, smsId); - pstmt.setString(++index, sms.getTrnsmitTelno()); - pstmt.setString(++index, sms.getTrnsmitCn()); - pstmt.setString(++index, sms.getFrstRegisterId()); - - pstmt.executeUpdate(); - - conn.commit(); - - return smsId; - } catch (SQLException ex) {//KISA 보안약점 조치 (2018-10-29, 윤창원) - if (conn != null) { - conn.rollback(); - } - throw ex; - } catch (Exception ex) { - if (conn != null) { - conn.rollback(); - } - throw ex; - - } finally { - SmsBasicDBUtil.close(null, pstmt, conn); - } - } - - /** - * 문자메시지 수신정보 및 결과 정보를 등록한다. - * @param smsRecptn - * @throws Exception - */ - public void insertSmsRecptnInf(SmsRecptn smsRecptn) throws Exception { - //variables - Connection conn = null; - PreparedStatement pstmt = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql & Oracle - buffer.append("INSERT INTO COMTNSMSRECPTN\n"); - buffer.append(" (SMS_ID, RECPTN_TELNO, RESULT_CODE, RESULT_MSSAGE)\n"); - buffer.append("VALUES\n"); - buffer.append("(?, ?, ?, ?)"); - - conn = SmsBasicDBUtil.getConnection(); - - pstmt = conn.prepareStatement(buffer.toString()); - - int index = 0; - - pstmt.setString(++index, smsRecptn.getSmsId()); - pstmt.setString(++index, smsRecptn.getRecptnTelno()); - pstmt.setString(++index, smsRecptn.getResultCode()); - pstmt.setString(++index, smsRecptn.getResultMssage()); - - pstmt.executeUpdate(); - - } finally { - SmsBasicDBUtil.close(null, pstmt, conn); - } - } - - /** - * 문자메시지에 대한 상세정보를 조회한다. - * - * @param searchVO - * @return - */ - public SmsVO selectSmsInf(SmsVO searchVO) throws Exception { - SmsVO smsVO = new SmsVO(); - - //variables - Connection conn = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql - buffer.append("SELECT\n"); - buffer.append(" a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN,\n"); - buffer.append(" a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM,\n"); - buffer.append(" DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM\n"); - buffer.append("FROM COMTNSMS a\n"); - buffer.append("LEFT OUTER JOIN COMVNUSERMASTER b\n"); - buffer.append(" ON a.FRST_REGISTER_ID = b.ESNTL_ID\n"); - buffer.append("WHERE a.SMS_ID = ?\n"); - - // for Oracle - /* - buffer.append("SELECT\n"); - buffer.append(" a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN,\n"); - buffer.append(" a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM,\n"); - buffer.append(" TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD') as FRST_REGIST_PNTTM\n"); - buffer.append("FROM COMTNSMS a\n"); - buffer.append("LEFT OUTER JOIN COMVNUSERMASTER b\n"); - buffer.append(" ON a.FRST_REGISTER_ID = b.ESNTL_ID\n"); - buffer.append("WHERE a.SMS_ID = ?\n"); - */ - - conn = SmsBasicDBUtil.getConnection(); - - pstmt = conn.prepareStatement(buffer.toString()); - - int index = 0; - - pstmt.setString(++index, searchVO.getSmsId()); - - rs = pstmt.executeQuery(); - - if (rs.next()) { - smsVO.setSmsId(rs.getString("SMS_ID")); - smsVO.setTrnsmitTelno(rs.getString("TRNSMIS_TELNO")); - smsVO.setTrnsmitCn(rs.getString("TRNSMIS_CN")); - smsVO.setFrstRegisterPnttm(rs.getString("FRST_REGIST_PNTTM")); - } - - return smsVO; - - } finally { - SmsBasicDBUtil.close(rs, pstmt, conn); - } - } - - /** - * 문자메시지 수신 및 결과 목록을 조회한다. - * - * @param SmsRecptn - */ - public List<SmsRecptn> selectSmsRecptnInfs(SmsRecptn vo) throws Exception { - List<SmsRecptn> list = new ArrayList<SmsRecptn>(); - - //variables - Connection conn = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql & Oracle - buffer.append("SELECT\n"); - buffer.append(" a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE\n"); - buffer.append("FROM COMTNSMSRECPTN a\n"); - buffer.append("WHERE a.SMS_ID = ?"); - - conn = SmsBasicDBUtil.getConnection(); - - pstmt = conn.prepareStatement(buffer.toString()); - - int index = 0; - - pstmt.setString(++index, vo.getSmsId()); - - rs = pstmt.executeQuery(); - - SmsRecptn result = null; - - while (rs.next()) { - result = new SmsRecptn(); - - result.setSmsId(rs.getString("SMS_ID")); - result.setRecptnTelno(rs.getString("RECPTN_TELNO")); - result.setResultCode(rs.getString("RESULT_CODE")); - result.setResultMssage(rs.getString("RESULT_MSSAGE")); - - list.add(result); - } - - return list; - - } finally { - SmsBasicDBUtil.close(rs, pstmt, conn); - } - } - - /** - * 문자메시지 전송 결과 수신을 처리한다. - * EgovSmsInfoReceiver(Schedule job)에 의해 호출된다. - * - * @param smsRecptn - * @return - * @throws Exception - */ - public void updateSmsRecptnInf(SmsRecptn smsRecptn) throws Exception { - //variables - Connection conn = null; - PreparedStatement pstmt = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql & Oracle - buffer.append("UPDATE COMTNSMSRECPTN SET\n"); - buffer.append(" RESULT_CODE = ?,\n"); - buffer.append(" RESULT_MSSAGE = ?\n"); - buffer.append("WHERE \n"); - buffer.append(" SMS_ID = ? AND RECPTN_TELNO = ?"); - - conn = SmsBasicDBUtil.getConnection(); - - pstmt = conn.prepareStatement(buffer.toString()); - - int index = 0; - - pstmt.setString(++index, smsRecptn.getResultCode()); - pstmt.setString(++index, smsRecptn.getResultMssage()); - pstmt.setString(++index, smsRecptn.getSmsId()); - pstmt.setString(++index, smsRecptn.getRecptnTelno()); - - pstmt.executeUpdate(); - - } finally { - SmsBasicDBUtil.close(null, pstmt, conn); - } - } - - /** - * ID 처리. - * transaction 처리를 위해 Connection을 파라미터로 넘겨받음 - * - * @return - * @throws Exception - */ - protected String getNextId(Connection conn) throws Exception { - //variables - PreparedStatement pstmt = null; - ResultSet rs = null; - - StringBuffer buffer = new StringBuffer(); - - try { - // for mySql - buffer.append("SELECT CONCAT('SMSID_', LPAD(IFNULL(MAX(SUBSTR(SMS_ID, 7, 14)), 0) + 1, 14, '0')) as SMS_ID from COMTNSMS\n"); - buffer.append("WHERE SMS_ID LIKE 'SMSID_%'"); - - // for Oracle - /* - buffer.append("SELECT CONCAT('SMSID_', LPAD(IFNULL(MAX(SUBSTR(SMS_ID, 7, 14)), 0) + 1, 14, '0')) as SMS_ID from COMTNSMS\n"); - buffer.append("WHERE SMS_ID LIKE 'SMSID_%'"); - */ - - pstmt = conn.prepareStatement(buffer.toString()); - - rs = pstmt.executeQuery(); - - if (rs.next()) { - return rs.getString("SMS_ID"); - } - - return null; - - } finally { - SmsBasicDBUtil.close(rs, pstmt, null); - } - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsDAO.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsDAO.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsDAO.java (nonexistent) @@ -1,101 +0,0 @@ - package egovframework.com.cop.sms.service.impl; - -import java.util.List; - -import egovframework.com.cmm.service.impl.EgovComAbstractDAO; -import egovframework.com.cop.sms.service.Sms; -import egovframework.com.cop.sms.service.SmsRecptn; -import egovframework.com.cop.sms.service.SmsVO; - -import org.springframework.stereotype.Repository; - -/** - * 문자메시지를 위한 데이터 접근 클래스 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.18 한성곤 최초 생성 - * - * </pre> - */ -@Repository("SmsDAO") -public class SmsDAO extends EgovComAbstractDAO { - /** - * 문자메시지 목록을 조회한다. - * - * @param SmsVO - */ - public List<SmsVO> selectSmsInfs(SmsVO vo) throws Exception { - return selectList("SmsDAO.selectSmsInfs", vo); - } - - /** - * 문자메시지 목록 숫자를 조회한다 - * - * @param SmsVO - * @return - * @throws Exception - */ - public int selectSmsInfsCnt(SmsVO vo) throws Exception { - return (Integer)selectOne("SmsDAO.selectSmsInfsCnt", vo); - } - - /** - * 문자메시지 정보를 등록한다. - * - * @param notification - * @return - * @throws Exception - */ - public String insertSmsInf(Sms sms) throws Exception { - return Integer.toString(insert("SmsDAO.insertSmsInf", sms)); - } - - /** - * 문자메시지 수신정보 및 결과 정보를 등록한다. - * @param smsRecptn - * @return - * @throws Exception - */ - public String insertSmsRecptnInf(SmsRecptn smsRecptn) throws Exception { - return Integer.toString(insert("SmsDAO.insertSmsRecptnInf", smsRecptn)); - } - - /** - * 문자메시지에 대한 상세정보를 조회한다. - * - * @param searchVO - * @return - */ - public SmsVO selectSmsInf(SmsVO searchVO) { - return (SmsVO)selectOne("SmsDAO.selectSmsInf", searchVO); - } - - /** - * 문자메시지 수신 및 결과 목록을 조회한다. - * - * @param SmsRecptn - */ - public List<SmsRecptn> selectSmsRecptnInfs(SmsRecptn vo) throws Exception { - return selectList("SmsDAO.selectSmsRecptnInfs", vo); - } - - /** - * 문자메시지 전송 결과 수신을 처리한다. - * EgovSmsInfoReceiver(Schedule job)에 의해 호출된다. - * - * @param smsRecptn - * @return - * @throws Exception - */ - public String updateSmsRecptnInf(SmsRecptn smsRecptn) throws Exception { - return Integer.toString(insert("SmsDAO.updateSmsRecptnInf", smsRecptn)); - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsBasicServiceImpl.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsBasicServiceImpl.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsBasicServiceImpl.java (nonexistent) @@ -1,393 +0,0 @@ -package egovframework.com.cop.sms.service.impl; - -//import java.io.BufferedInputStream; -//import java.io.FileInputStream; -import java.text.ParseException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import egovframework.com.cmm.service.EgovProperties; -import egovframework.com.cop.sms.service.EgovSmsInfoService; -import egovframework.com.cop.sms.service.Sms; -import egovframework.com.cop.sms.service.SmsConnection; -import egovframework.com.cop.sms.service.SmsRecptn; -import egovframework.com.cop.sms.service.SmsVO; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * 문자메시지를 위한 서비스 구현 클래스 (프레임워크 비종속 버전) - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.11.24 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.11.24 한성곤 최초 생성 - * - * </pre> - */ -public class EgovSmsBasicServiceImpl implements EgovSmsInfoService { - private SmsBasicDAO smsDao = new SmsBasicDAO(); - - private String smeConfigPath = null; - - private static final Logger LOGGER = LoggerFactory.getLogger(EgovSmsBasicServiceImpl.class); - - public EgovSmsBasicServiceImpl() { - //-------------------------------- - // 속성 정보 얻기 - // M-Gov에서 배포하는 SMEConfig.conf 파일을 절대경로로 지정하면 된다. - //-------------------------------- - // //globals.properties를 활용한 방ㅣㄱ (공통모듈 사용) - //smeConfigPath = EgovProperties.getProperty("Globals.SMEConfigPath"); - - // //globals.properties를 직접 활용한 방식 - //String globalsPropertiesFile = System.getProperty("user.home") - // + System.getProperty("file.separator") + "egovProps" - // + System.getProperty("file.separator") + "globals.properties"; - // - //FileInputStream fis = null; - // - //try { - // Properties props = new Properties(); - // fis = new FileInputStream(globalsPropertiesFile); - // props.load(new BufferedInputStream(fis)); - // - // smeConfigPath = props.getProperty("Globals.SMEConfigPath").trim(); - //} catch(Exception ex) { - // logger.error(ex); - //} finally { - // try { - // if (fis != null) { - // fis.close(); - // } - // } catch (Exception ex) { - // ex.printStackTrace(); - // } - //} - - - if(EgovProperties.class.getResource("") != null) { - String globalsPropertiesFile = EgovProperties.class.getResource("").getPath() - + System.getProperty("file.separator") + ".." + System.getProperty("file.separator") - + ".." + System.getProperty("file.separator") + ".." + System.getProperty("file.separator") - + System.getProperty("file.separator") + "egovProps" - + System.getProperty("file.separator") + "conf" - + System.getProperty("file.separator") + "SMEConfig.properties"; - - smeConfigPath = globalsPropertiesFile; - } - - } - - private String getPhoneNumber(String number) { - String result = number; - - if (number == null || number.trim().equals("")) { - return ""; - } - - result = result.replace("-", ""); - result = result.replace("(", ""); - result = result.replace(")", ""); - result = result.replace(" ", ""); - - return result; - } - - private String formatPhoneNumber(String number) throws ParseException { - if (number == null || number.trim().equals("")) { - return ""; - } - - StringBuffer buffer = new StringBuffer(); - - - if (number.length() == 9) { // 02-500-1234 형식 - buffer.append(number.substring(0, 2)); - buffer.append("-"); - buffer.append(number.substring(2, 2+3)); - buffer.append("-"); - buffer.append(number.substring(2+3, 2+3+4)); - - } else if (number.length() == 10) { - if (number.startsWith("02")) { // 02-5000-1234 형식 - buffer.append(number.substring(0, 2)); - buffer.append("-"); - buffer.append(number.substring(2, 2 + 4)); - buffer.append("-"); - buffer.append(number.substring(2 + 4, 2 + 4 + 4)); - - } else { // 031-500-1234 형식 - buffer.append(number.substring(0, 3)); - buffer.append("-"); - buffer.append(number.substring(3, 3 + 3)); - buffer.append("-"); - buffer.append(number.substring(3 + 3, 3 + 3 + 4)); - } - - } else if (number.length() == 11) { // 031-5000-1234 형식 - buffer.append(number.substring(0, 3)); - buffer.append("-"); - buffer.append(number.substring(3, 3+4)); - buffer.append("-"); - buffer.append(number.substring(3+4,3+4+4)); - - } else if (number.length() == 12) { // 0505-5000-1234 형식 - buffer.append(number.substring(0, 4)); - buffer.append("-"); - buffer.append(number.substring(4, 4+4)); - buffer.append("-"); - buffer.append(number.substring(4+4, 4+4+4)); - - } else { - return number; - } - - return buffer.toString(); - } - - /** - * 문자메시지 목록을 조회 한다. - */ - public Map<String, Object> selectSmsInfs(SmsVO searchVO) throws Exception { - List<SmsVO> result = smsDao.selectSmsInfs(searchVO); - int cnt = smsDao.selectSmsInfsCnt(searchVO); - - // 전화번호 포맷 처리 - for (int i = 0; i < result.size(); i++) { - String phone = result.get(i).getTrnsmitTelno(); - result.get(i).setTrnsmitTelno(formatPhoneNumber(phone)); - } - - Map<String, Object> map = new HashMap<String, Object>(); - - map.put("resultList", result); - map.put("resultCnt", Integer.toString(cnt)); - - return map; - } - - /** - * 문자메시지를 전송(등록)한다. - */ - public void insertSmsInf(Sms sms) throws Exception { - HashMap<String, SmsRecptn> check = new HashMap<String, SmsRecptn>(); - - sms.setTrnsmitTelno(getPhoneNumber(sms.getTrnsmitTelno())); - - //--------------------------------------- - // 마스터 정보 등록 - //--------------------------------------- - String smsId = smsDao.insertSmsInf(sms); - - //--------------------------------------- - // 전송 요청 및 상세(수신자)정보 등록 - //--------------------------------------- - SmsRecptn smsRecptn = null; - if ( sms != null && sms.getRecptnTelno() != null) { - for (int i = 0; i < sms.getRecptnTelno().length; i++) { - if (getPhoneNumber(sms.getRecptnTelno()[i]).equals("")) { - continue; - } - smsRecptn = new SmsRecptn(); - - smsRecptn.setSmsId(smsId); - smsRecptn.setRecptnTelno(getPhoneNumber(sms.getRecptnTelno()[i])); - - // 동일 전화번호면 SKIP - if (check.containsKey(smsRecptn.getRecptnTelno())) { - continue; - } else { - check.put(smsRecptn.getRecptnTelno(), smsRecptn); - } - - //--------------------------------------- - // 실 전송 요청 저장 - //--------------------------------------- - SmsConnection smsConn = new SmsConnection(); - - smsConn.setCallFrom(sms.getTrnsmitTelno()); - smsConn.setCallTo(smsRecptn.getRecptnTelno()); - smsConn.setCallBack(smsRecptn.getRecptnTelno()); - smsConn.setCallBackUrl(""); - smsConn.setText(sms.getTrnsmitCn()); - - smsConn.setMessageId(smsId + "-" + smsRecptn.getRecptnTelno()); - - // SMS 전송 요청 - EgovSmsInfoSender sender = null; - SmsConnection result = null; - try { - sender = new EgovSmsInfoSender(smeConfigPath); - - sender.open(); - result = sender.send(smsConn); - } finally { - if (sender != null) { - sender.close(); - } - } - ////------------------------------------- - - // Sender의 전송 결과는 SMS G/W 처리 상의 결과만 리턴함 - // 이동통신사의 오류는 별도의 Receiver에서 수신 처리함 - // 수신 처리시 MessageId의 구성 형식(SMS_ID + "-" + 수신전화번호)를 통해 DB에 결과를 반영 - - if (result != null) { // 2011.10.21 보안점검 후속조치 - smsRecptn.setResultCode(Integer.toString(result.getResult())); - smsRecptn.setResultMssage(result.getResultMessage()); - } - - smsDao.insertSmsRecptnInf(smsRecptn); - } - } - } - - /** - * 문자메시지에 대한 상세정보를 조회한다. - */ - public SmsVO selectSmsInf(SmsVO searchVO) throws Exception { - SmsVO vo = smsDao.selectSmsInf(searchVO); - - // 전화번호 포맷 처리 - vo.setTrnsmitTelno(formatPhoneNumber(vo.getTrnsmitTelno())); - - SmsRecptn recptn = new SmsRecptn(); - - recptn.setSmsId(searchVO.getSmsId()); - - List<SmsRecptn> list = smsDao.selectSmsRecptnInfs(recptn); - - // 전화번호 포맷 처리 - for (int i = 0; i < list.size(); i++) { - String phone = list.get(i).getRecptnTelno(); - list.get(i).setRecptnTelno(formatPhoneNumber(phone)); - } - - vo.setRecptn(list); - - return vo; - } - - /** - * 문자메시지 실 전송을 요청한다. - */ - public SmsConnection sendRequsest(SmsConnection smsConn) throws Exception { - String callTo = smsConn.getCallTo(); - String callFrom = smsConn.getCallFrom(); - String callBack = smsConn.getCallBack(); - String callBackUrl = smsConn.getCallBackUrl(); - String text = smsConn.getText(); - String messageId = smsConn.getMessageId(); // messageId 지정 필요 - - /* - System.out.println("------------------------"); - System.out.println("callTo = " + callTo); - System.out.println("callFrom = " + callFrom); - System.out.println("callBack = " + callBack); - System.out.println("callBackUrl = " + callBackUrl); - System.out.println("text = " + text); - System.out.println("messageId = " + messageId); - */ - LOGGER.info("------------------------"); - LOGGER.info("callTo = {}", callTo); - LOGGER.info("callFrom = {}", callFrom); - LOGGER.info("callBack = {}", callBack); - LOGGER.info("callBackUrl = {}", callBackUrl); - LOGGER.info("text = {}", text); - LOGGER.info("messageId = {}", messageId); - - // SMS 전송 요청 - EgovSmsInfoSender sender = null; - SmsConnection result = null; - try { - sender = new EgovSmsInfoSender(smeConfigPath); - - sender.open(); - result = sender.send(smsConn); - } finally { - if (sender != null) { - sender.close(); - } - } - - // Sender의 전송 결과는 SMS G/W 처리 상의 결과만 리턴함 - // 이동통신사의 오류는 별도의 Receiver에서 수신 처리함 (로그 기록) - - if (result != null) { // 2011.10.21 보안점검 후속조치 - smsConn.setResult(result.getResult()); - smsConn.setResultMessage(result.getResultMessage()); - } - - return smsConn; - } - - /** - * 여러 건의 문자메시지 실 전송을 요청한다. - * - * @param smsConn - * @return - * @throws Exception - */ - public SmsConnection[] sendRequsest(SmsConnection[] smsConn) throws Exception { - EgovSmsInfoSender sender = null; - - try { - sender = new EgovSmsInfoSender(smeConfigPath); - - sender.open(); - - // SMS 전송 요청 - SmsConnection result = null; - for (int i = 0; i < smsConn.length; i++) { - String callTo = smsConn[i].getCallTo(); - String callFrom = smsConn[i].getCallFrom(); - String callBack = smsConn[i].getCallBack(); - String callBackUrl = smsConn[i].getCallBackUrl(); - String text = smsConn[i].getText(); - String messageId = smsConn[i].getMessageId(); // messageId 지정 필요 - - /* - System.out.println("------------------------"); - System.out.println("callTo[" + i + "] = " + callTo); - System.out.println("callFrom[" + i + "] = " + callFrom); - System.out.println("callBack[" + i + "] = " + callBack); - System.out.println("callBackUrl[" + i + "] = " + callBackUrl); - System.out.println("text =[" + i + "] = " + text); - System.out.println("messageId[" + i + "] = " + messageId); - */ - LOGGER.info("------------------------"); - LOGGER.info("callTo[{}] = {}", i, callTo); - LOGGER.info("callFrom[{}] = {}", i, callFrom); - LOGGER.info("callBack[{}] = {}", i, callBack); - LOGGER.info("callBackUrl[{}] = {}", i, callBackUrl); - LOGGER.info("text =[{}] = {}", i, text); - LOGGER.info("messageId[{}] = {}", i, messageId); - - //smsConn[i] = sendRequsest(smsConn[i]); - result = sender.send(smsConn[i]); - - // Sender의 전송 결과는 SMS G/W 처리 상의 결과만 리턴함 - // 이동통신사의 오류는 별도의 Receiver에서 수신 처리함 (로그 기록) - - smsConn[i].setResult(result.getResult()); - smsConn[i].setResultMessage(result.getResultMessage()); - } - - } finally { - if (sender != null) { - sender.close(); - } - } - - return smsConn; - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoServiceImpl.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoServiceImpl.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoServiceImpl.java (nonexistent) @@ -1,351 +0,0 @@ -package egovframework.com.cop.sms.service.impl; - -import java.text.ParseException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import egovframework.com.cmm.service.EgovProperties; -import egovframework.com.cop.sms.service.EgovSmsInfoService; -import egovframework.com.cop.sms.service.Sms; -import egovframework.com.cop.sms.service.SmsConnection; -import egovframework.com.cop.sms.service.SmsRecptn; -import egovframework.com.cop.sms.service.SmsVO; - -import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; -import egovframework.rte.fdl.idgnr.EgovIdGnrService; - -import javax.annotation.PostConstruct; -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -/** - * 문자메시지를 위한 서비스 구현 클래스 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.18 한성곤 최초 생성 - * - * </pre> - */ -@Service("EgovSmsInfoService") -public class EgovSmsInfoServiceImpl extends EgovAbstractServiceImpl implements EgovSmsInfoService { - @Resource(name="SmsDAO") - private SmsDAO smsDao; - - @Resource(name="egovSmsIdGnrService") - private EgovIdGnrService idgenService; - - private String smeConfigPath = null; - - private static final Logger LOGGER = LoggerFactory.getLogger(EgovSmsInfoServiceImpl.class); - - @PostConstruct - public void init() { - //-------------------------------- - // 속성 정보 얻기 - //-------------------------------- - this.smeConfigPath = EgovProperties.getPathProperty("Globals.SMEConfigPath"); - } - - private String getPhoneNumber(String number) { - String result = number; - - if (number == null || number.trim().equals("")) { - return ""; - } - - result = result.replace("-", ""); - result = result.replace("(", ""); - result = result.replace(")", ""); - result = result.replace(" ", ""); - - return result; - } - - private String formatPhoneNumber(String number) throws ParseException { - if (number == null || number.trim().equals("")) { - return ""; - } - - StringBuffer buffer = new StringBuffer(); - - - if (number.length() == 9) { // 02-500-1234 형식 - buffer.append(number.substring(0, 2)); - buffer.append("-"); - buffer.append(number.substring(2, 2+3)); - buffer.append("-"); - buffer.append(number.substring(2+3, 2+3+4)); - - } else if (number.length() == 10) { - if (number.startsWith("02")) { // 02-5000-1234 형식 - buffer.append(number.substring(0, 2)); - buffer.append("-"); - buffer.append(number.substring(2, 2 + 4)); - buffer.append("-"); - buffer.append(number.substring(2 + 4, 2 + 4 + 4)); - - } else { // 031-500-1234 형식 - buffer.append(number.substring(0, 3)); - buffer.append("-"); - buffer.append(number.substring(3, 3 + 3)); - buffer.append("-"); - buffer.append(number.substring(3 + 3, 3 + 3 + 4)); - } - - } else if (number.length() == 11) { // 031-5000-1234 형식 - buffer.append(number.substring(0, 3)); - buffer.append("-"); - buffer.append(number.substring(3, 3+4)); - buffer.append("-"); - buffer.append(number.substring(3+4,3+4+4)); - - } else if (number.length() == 12) { // 0505-5000-1234 형식 - buffer.append(number.substring(0, 4)); - buffer.append("-"); - buffer.append(number.substring(4, 4+4)); - buffer.append("-"); - buffer.append(number.substring(4+4, 4+4+4)); - - } else { - return number; - } - - return buffer.toString(); - } - - /** - * 문자메시지 목록을 조회 한다. - */ - public Map<String, Object> selectSmsInfs(SmsVO searchVO) throws Exception { - List<SmsVO> result = smsDao.selectSmsInfs(searchVO); - int cnt = smsDao.selectSmsInfsCnt(searchVO); - - // 전화번호 포맷 처리 - for (int i = 0; i < result.size(); i++) { - String phone = result.get(i).getTrnsmitTelno(); - result.get(i).setTrnsmitTelno(formatPhoneNumber(phone)); - } - - Map<String, Object> map = new HashMap<String, Object>(); - - map.put("resultList", result); - map.put("resultCnt", Integer.toString(cnt)); - - return map; - } - - /** - * 문자메시지를 전송(등록)한다. - */ - public void insertSmsInf(Sms sms) throws Exception { - HashMap<String, SmsRecptn> check = new HashMap<String, SmsRecptn>(); - - String smsId = idgenService.getNextStringId(); - - sms.setSmsId(smsId); - - sms.setTrnsmitTelno(getPhoneNumber(sms.getTrnsmitTelno())); - - //--------------------------------------- - // 마스터 정보 등록 - //--------------------------------------- - smsDao.insertSmsInf(sms); - - //--------------------------------------- - // 전송 요청 및 상세(수신자)정보 등록 - //--------------------------------------- - SmsRecptn smsRecptn = null; - if (sms != null && sms.getRecptnTelno() != null) { - for (int i = 0; i < sms.getRecptnTelno().length; i++) { - if (getPhoneNumber(sms.getRecptnTelno()[i]).equals("")) { - continue; - } - smsRecptn = new SmsRecptn(); - - smsRecptn.setSmsId(smsId); - smsRecptn - .setRecptnTelno(getPhoneNumber(sms.getRecptnTelno()[i])); - - // 동일 전화번호면 SKIP - if (check.containsKey(smsRecptn.getRecptnTelno())) { - continue; - } else { - check.put(smsRecptn.getRecptnTelno(), smsRecptn); - } - - // --------------------------------------- - // 실 전송 요청 저장 - // --------------------------------------- - SmsConnection smsConn = new SmsConnection(); - - smsConn.setCallFrom(sms.getTrnsmitTelno()); - smsConn.setCallTo(smsRecptn.getRecptnTelno()); - smsConn.setCallBack(smsRecptn.getRecptnTelno()); - smsConn.setCallBackUrl(""); - smsConn.setText(sms.getTrnsmitCn()); - - smsConn.setMessageId(smsId + "-" + smsRecptn.getRecptnTelno()); - - // SMS 전송 요청 - EgovSmsInfoSender sender = null; - SmsConnection result = null; - try { - sender = new EgovSmsInfoSender(smeConfigPath); - - sender.open(); - result = sender.send(smsConn); - } finally { - if (sender != null) { - sender.close(); - } - } - // //------------------------------------- - - // Sender의 전송 결과는 SMS G/W 처리 상의 결과만 리턴함 - // 이동통신사의 오류는 별도의 Receiver에서 수신 처리함 - // 수신 처리시 MessageId의 구성 형식(SMS_ID + "-" + 수신전화번호)를 통해 DB에 결과를 반영 - - // 2011.10.21 보안점검 후속조치 - if (result != null) { - smsRecptn - .setResultCode(Integer.toString(result.getResult())); - smsRecptn.setResultMssage(result.getResultMessage()); - } - smsDao.insertSmsRecptnInf(smsRecptn); - } - } - } - - /** - * 문자메시지에 대한 상세정보를 조회한다. - */ - public SmsVO selectSmsInf(SmsVO searchVO) throws Exception { - SmsVO vo = smsDao.selectSmsInf(searchVO); - - // 전화번호 포맷 처리 - vo.setTrnsmitTelno(formatPhoneNumber(vo.getTrnsmitTelno())); - - SmsRecptn recptn = new SmsRecptn(); - - recptn.setSmsId(searchVO.getSmsId()); - - List<SmsRecptn> list = smsDao.selectSmsRecptnInfs(recptn); - - // 전화번호 포맷 처리 - for (int i = 0; i < list.size(); i++) { - String phone = list.get(i).getRecptnTelno(); - list.get(i).setRecptnTelno(formatPhoneNumber(phone)); - } - - vo.setRecptn(list); - - return vo; - } - - /** - * 문자메시지 실 전송을 요청한다. - */ - public SmsConnection sendRequsest(SmsConnection smsConn) throws Exception { - String callTo = smsConn.getCallTo(); - String callFrom = smsConn.getCallFrom(); - String callBack = smsConn.getCallBack(); - String callBackUrl = smsConn.getCallBackUrl(); - String text = smsConn.getText(); - String messageId = smsConn.getMessageId(); // messageId 지정 필요 - - LOGGER.info("------------------------"); - LOGGER.info("callTo = {}", callTo); - LOGGER.info("callFrom = {}", callFrom); - LOGGER.info("callBack = {}", callBack); - LOGGER.info("callBackUrl = {}", callBackUrl); - LOGGER.info("text = {}", text); - LOGGER.info("messageId = {}", messageId); - - // SMS 전송 요청 - EgovSmsInfoSender sender = null; - SmsConnection result = null; - try { - sender = new EgovSmsInfoSender(smeConfigPath); - - sender.open(); - result = sender.send(smsConn); - } finally { - if (sender != null) { - sender.close(); - } - } - - // Sender의 전송 결과는 SMS G/W 처리 상의 결과만 리턴함 - // 이동통신사의 오류는 별도의 Receiver에서 수신 처리함 (로그 기록) - - if (result != null) { // 2011.10.21 보안점검 후속조치 - smsConn.setResult(result.getResult()); - smsConn.setResultMessage(result.getResultMessage()); - } - return smsConn; - } - - /** - * 여러 건의 문자메시지 실 전송을 요청한다. - * - * @param smsConn - * @return - * @throws Exception - */ - public SmsConnection[] sendRequsest(SmsConnection[] smsConn) throws Exception { - EgovSmsInfoSender sender = null; - - try { - sender = new EgovSmsInfoSender(smeConfigPath); - - sender.open(); - - // SMS 전송 요청 - SmsConnection result = null; - for (int i = 0; i < smsConn.length; i++) { - String callTo = smsConn[i].getCallTo(); - String callFrom = smsConn[i].getCallFrom(); - String callBack = smsConn[i].getCallBack(); - String callBackUrl = smsConn[i].getCallBackUrl(); - String text = smsConn[i].getText(); - String messageId = smsConn[i].getMessageId(); // messageId 지정 필요 - - LOGGER.info("------------------------"); - LOGGER.info("callTo[{}] = {}", i, callTo); - LOGGER.info("callFrom[{}] = {}", i, callFrom); - LOGGER.info("callBack[{}] = {}", i, callBack); - LOGGER.info("callBackUrl[{}] = {}", i, callBackUrl); - LOGGER.info("text =[{}] = {}", i, text); - LOGGER.info("messageId[{}] = {}", i, messageId); - - //smsConn[i] = sendRequsest(smsConn[i]); - result = sender.send(smsConn[i]); - - // Sender의 전송 결과는 SMS G/W 처리 상의 결과만 리턴함 - // 이동통신사의 오류는 별도의 Receiver에서 수신 처리함 (로그 기록) - - smsConn[i].setResult(result.getResult()); - smsConn[i].setResultMessage(result.getResultMessage()); - } - - } finally { - if (sender != null) { - sender.close(); - } - } - - return smsConn; - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsBasicDBUtil.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsBasicDBUtil.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/SmsBasicDBUtil.java (nonexistent) @@ -1,171 +0,0 @@ -package egovframework.com.cop.sms.service.impl; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -import org.apache.commons.dbcp2.BasicDataSource; -import org.apache.commons.dbcp2.DataSourceConnectionFactory; -import org.apache.commons.dbcp2.PoolableConnection; -import org.apache.commons.dbcp2.PoolableConnectionFactory; -import org.apache.commons.dbcp2.PoolingDriver; -import org.apache.commons.pool2.impl.GenericObjectPool; -import org.apache.commons.pool2.impl.GenericObjectPoolConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import egovframework.com.cmm.service.EgovProperties; -import egovframework.com.cmm.service.Globals; - -/** - * 문자메시지를 위한 DB Util 클래스 (프레임워크 비종속 버전) - * Apache commons의 DBCP를 활용한 예로 각 프로젝트에 맞게 수정 필요 - * (EX : DataSource 사용 등) - * - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.11.24 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ---------- -------- --------------------------- - * 2009.11.24 한성곤 최초 생성 - * 2017-02-13 이정은 시큐어코딩(ES) - 시큐어코딩 부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - * 2020-07-01 신용호 DBCP2 관련 변경사항 적용 - * - * </pre> - */ -public class SmsBasicDBUtil { - /** Driver load 여부 */ - private static boolean isDriverLoaded = false; - - /** Connection Pool Alias */ - private static final String JDBC_ALIAS = EgovProperties.getProperty(Globals.SMSDB_CONF_PATH, "JDBC_ALIAS"); - /** JDBC Driver 명 */ - private static final String JDBC_DRIVER = EgovProperties.getProperty(Globals.SMSDB_CONF_PATH, "JDBC_DRIVER"); - /** JDBC 접속 URL */ - private static final String JDBC_URL = EgovProperties.getProperty(Globals.SMSDB_CONF_PATH, "JDBC_URL"); - /** JDBC 접속 사용자ID */ - private static final String JDBC_USER = EgovProperties.getProperty(Globals.SMSDB_CONF_PATH, "JDBC_USER"); - /** JDBC 접속 패스워드 */ - private static final String JDBC_PASSWORD = EgovProperties.getProperty(Globals.SMSDB_CONF_PATH, "JDBC_PASSWORD"); - /** 한번에 pool에서 갖다 쓸 수 있는 최대 커넥션 개수 */ - private static final int MAX_TOTAL = 20; - /** 반납직후 pool에 저정될 수 있는 최대 유휴커넥션 개수 */ - private static final int MAX_IDLE = 10; - /** 사용되지 않고 pool에 유지할 최소한의 커넥션 개수 */ - private static final int MIN_IDLE = 5; - // 최대 커넥션이 20이고 maxIdle이 10인경우 - // DB요청이 유휴상태가 되면 20개까지 생성된 커넥션풀은 10개까지 유휴커넥션으로 줄어들수 있다. (10~20개까지 커넥션풀의 갯수가 생성및 반납을 반복한다.) - // 이후 최소 IDLE까지 줄어들수 있다. - /** 커넥션 timeout */ - private static final int MAX_WAIT_MILLIS = 20000; - /** auto commit 여부 */ - private static final boolean DEFAULT_AUTOCOMMIT = true; - /** read only 여부 */ - private static final boolean DEFAULT_READONLY = false; - - /** Logger */ - private static final Logger LOGGER = LoggerFactory.getLogger(SmsBasicDBUtil.class); - - /** - * Connection Pool 생성. - * - * @param alias - * @param bds - * @throws Exception - */ - protected static void createPools(String alias, BasicDataSource bds) { - - DataSourceConnectionFactory factory = new DataSourceConnectionFactory(bds); - PoolableConnectionFactory poolableConnectionFactory; - - poolableConnectionFactory = new PoolableConnectionFactory(factory, null); - - //커넥션이 유효한지 확인 - poolableConnectionFactory.setValidationQuery(" SELECT 1 FROM DUAL "); - //커넥션 풀의 설정 정보를 생성 - GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig(); - //유효 커넥션 검사 주기 - poolConfig.setTimeBetweenEvictionRunsMillis(1000L * 60L * 1L); - //풀에 있는 커넥션이 유효한지 검사 유무 설정 - poolConfig.setTestWhileIdle(true); - //기본값 : false /true 일 경우 validationQuery 를 매번 수행한다. - poolConfig.setTestOnBorrow(false); - //커넥션 최소갯수 설정 - poolConfig.setMinIdle(bds.getMinIdle()); - //반납직후 커넥션 최소갯수 설정 - poolConfig.setMaxIdle(bds.getMaxIdle()); - //커넥션 최대 갯수 설정 - poolConfig.setMaxTotal(bds.getMaxTotal()); - GenericObjectPool<PoolableConnection> connectionPool = new GenericObjectPool<PoolableConnection>(poolableConnectionFactory,poolConfig); - //PoolableConnectionFactory 커넥션 풀 연결 - poolableConnectionFactory.setPool(connectionPool); - - LOGGER.info("Pool : {}", poolableConnectionFactory.getClass().getName()); - - } - - protected static synchronized void loadDriver() { - BasicDataSource bds = new BasicDataSource(); - - bds.setDriverClassName(JDBC_DRIVER); - bds.setUrl(JDBC_URL); - bds.setUsername(JDBC_USER); - bds.setPassword(JDBC_PASSWORD); - bds.setMaxTotal(MAX_TOTAL); - bds.setMaxIdle(MAX_IDLE); - bds.setMinIdle(MIN_IDLE); - bds.setMaxWaitMillis(MAX_WAIT_MILLIS); - bds.setDefaultAutoCommit(DEFAULT_AUTOCOMMIT); - bds.setDefaultReadOnly(DEFAULT_READONLY); - - createPools(JDBC_ALIAS, bds); - isDriverLoaded = true; - LOGGER.info("Initialized pool : {}", JDBC_ALIAS); - } - - public static Connection getConnection() throws Exception { - if (!isDriverLoaded) { - loadDriver(); - } - - Connection connection = DriverManager.getConnection("jdbc:apache:commons:dbcp:" + JDBC_ALIAS); - return connection; - } - - public static void close(ResultSet rs, Statement stmt, Connection conn) { - if (rs != null) - try { - rs.close(); - //2017.02.08 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - } catch (SQLException ignore) { - LOGGER.error("[SQLExceptionException] : database access error occurs"); - } catch (Exception ignore) { - LOGGER.error("["+ ignore.getClass() +"] : ", ignore.getMessage()); - } - if (stmt != null) - try { - stmt.close(); - //2017.02.08 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - } catch (SQLException ignore) { - LOGGER.error("[SQLExceptionException] : database access error occurs"); - } catch (Exception ignore) { - LOGGER.error("["+ ignore.getClass() +"] : ", ignore.getMessage()); - } - if (conn != null) - try { - conn.close(); - //2017.02.08 이정은 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754] - } catch (SQLException ignore) { - LOGGER.error("[SQLExceptionException] : database access error occurs"); - } catch (Exception ignore) { - LOGGER.error("["+ ignore.getClass() +"] : ", ignore.getMessage()); - } - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoSender.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoSender.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/impl/EgovSmsInfoSender.java (nonexistent) @@ -1,213 +0,0 @@ -package egovframework.com.cop.sms.service.impl; - -import egovframework.com.cop.sms.service.SmsConnection; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import x3.client.smeapi.SMEConnection; -import x3.client.smeapi.SMEConnectionFactory; -import x3.client.smeapi.SMEException; -import x3.client.smeapi.SMERequest; -import x3.client.smeapi.SMEResponse; -import x3.client.smeapi.SMESender; -import x3.client.smeapi.SMESession; -import x3.client.smeapi.impl.SMEConfig; -import x3.client.smeapi.impl.SMEConnectionFactoryImpl; -import x3.client.smeapi.impl.SMELogger; - -/** - * 문자메시지 연동 처리를 위한 클래스 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.08.05 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.08.05 한성곤 최초 생성 - * - * </pre> - */ -public class EgovSmsInfoSender { - /** SMS 서버 URL */ - private final String connString; // ex) sme://000.000.000.000:20000 - /** SMS 연계 ID */ - private final String smsId; - /** SMS 연계 password */ - private final String smsPwd; - - /** SMS G/W Connection Factory */ - private SMEConnectionFactory factSender = null; - /** SMS G/W Connection */ - private SMEConnection connSender = null; - /** SMS G/W Session */ - private SMESession sessSender = null; - /** SMS G/W Sender */ - private SMESender sender = null; - - private static final Logger LOGGER = LoggerFactory.getLogger(EgovSmsInfoSender.class); - - /** - * SMS 연계를 위한 생성자. - * SMEConfig 설정파일로부터 필요한 연결 정보 및 로그 관련 정보를 얻는다. - * - * @param configFile - * @throws Exception - */ - public EgovSmsInfoSender(String configFile) throws Exception { - SMEConfig.configSet(configFile); - - connString = SMEConfig.getSmsUrl(); - smsId = SMEConfig.getSmsId(); - smsPwd = SMEConfig.getSmsPwd(); - - String tmp = null; - - tmp = SMEConfig.getLogLevel(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogLevel(tmp); - } - - tmp = SMEConfig.getLogLayout(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogLayout(tmp); - } - - tmp = SMEConfig.getLogPath(); - if (tmp != null && !tmp.equals("")) { - SMELogger.setLogPath(tmp); - } - - SMELogger.setUseConsoleLogger(SMEConfig.getUseConsoleLogger()); - SMELogger.setUseFileLogger(SMEConfig.getUseFileLogger()); - } - - /** - * SMS 연결을 위한 Connection 및 Session 생성한다. - * 발송건이 있을 경우만 open()을 호출하고 close()를 호출하여 종료한다. - * 만약 DB 와 연동시 select로 데이타 검출시 데이타가 없으면 - * open()을 호출하지 않는다. (중요!!! 꼭 데이타가 있을 경우만 open() 을 하여 접속) - * - * @throws SMEException - */ - public void open() throws SMEException { - this.factSender = new SMEConnectionFactoryImpl(connString); - this.connSender = factSender.createConnection(smsId, smsPwd); // 아이디와 패스워드입니다. - this.sessSender = connSender.createSession(); - this.sender = sessSender.createSender(); - - // 현재 발송한 호에 대해서 리포트 수신을 위해서는 true 로 설정해야 리포트 수신을 할 수 있다. - // 만약 false 로 세팅하고 발송을 하면 현재 발송한 호에 대해서는 결과수신을 할 수 없다. - // 리포트가 필요없는 기관에서는 아래 디폴트값인 false를 유지한다. - // false로 설정을 하면 보내는 메시지에 대해서 결과를 수신할 수 없습니다. - // [2008-08-25] 리포트 수신 필수조건으로 변경 - // 리포트는 필수 수신입니다. - this.sessSender.setReceiverCreated(true); - this.connSender.start(); - } - - /** - * SMS를 전송한다. - * - * @param smsConn - * @return - */ - public SmsConnection send(SmsConnection smsConn) throws SMEException { - SMERequest request = null; - - try { - request = sessSender.createRequest(); - // destination - request.setTo(smsConn.getCallTo()); //수신번호 - // origination - request.setFrom(smsConn.getCallFrom()); //발신번호 - // callback - request.setCallback(smsConn.getCallBack()); //회신번호(콜백번호) - - // callbackurl - // 무선인터넷 주소 휴대전화 인터넷 (WAP) 페이지 접속용 URL - // 단문자메세지 외의 별도 과금이 되므로 WAP 페이지가 있는 기관에서만 사용 - // 해당 URL 접속시 수신자에게 과금이 되므로 주의. - request.setCallbackURL(smsConn.getCallBackUrl()); //CallbackURL은 선택사항 입니다. - - // message (메세지내용) - request.setText(smsConn.getText()); - - // serial *MUST* be unique number in single SME. - // 반드시 메시지 발송시 연속되는 일련번호 형식을 띈 고유값이어야 함 - // SMS G/W로 전송누적 일련번호 - // 예) 'TestMessage-000000' 숫자 또는 문자 + 숫자로 조합 가능 ( 40 byte ) - // 예) '200808251259590001' - request.setMessageId(smsConn.getMessageId()); //일련번호 고유값 - - sender = sessSender.createSender(); - SMEResponse res = sender.send(request); - int nRes = res.getResult(); - - smsConn.setResult(nRes); - //smsConn.setResultMessage(""); - - switch (nRes) { - case 0: - smsConn.setResultMessage(""); - break; - case 3000: - smsConn.setResultMessage("착발신 번호 포맷 오류 또는 부재"); - break; - case 3001: - smsConn.setResultMessage("콜백번호 포맷 오류"); - break; - case 3002: - smsConn.setResultMessage("MessageID 포맷 오류 또는 부재"); - break; - case 3003: - smsConn.setResultMessage("Text 및 Callback URL 포맷 오류"); - break; - case 4005: - smsConn.setResultMessage("SMG Server 스팸 메시지로 처리 거부됨"); - break; - case 5000: - smsConn.setResultMessage("SMG Server 내부 에러 (인증실패,연결실패)"); - break; - default: - smsConn.setResultMessage("알 수 없는 오류 발생"); - } - - } catch (SMEException ex) { - throw ex; - } - - return smsConn; - } - - /** - * SMS 연결을 위한 Connection 및 Session 해제한다. - * 메시지 처리 전송후 반드시 종료해야 한다. - */ - public void close() { - try { - if (sender != null) - sender.close(); - } catch (SMEException ignore) { - LOGGER.debug(ignore.getMessage()); - } - - try { - if (sessSender != null) - sessSender.close(); - } catch (SMEException ignore) { - LOGGER.debug(ignore.getMessage()); - } - - try { - if (connSender != null) - connSender.close(); - } catch (SMEException ignore) { - LOGGER.debug(ignore.getMessage()); - } - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/Sms.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/Sms.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/Sms.java (nonexistent) @@ -1,242 +0,0 @@ -package egovframework.com.cop.sms.service; - -import java.io.Serializable; -import java.util.List; - -import org.apache.commons.lang3.builder.ToStringBuilder; - -/** - * 문자메시지 서비스 데이터 처리 모델 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.18 한성곤 최초 생성 - * 2011.10.07 이기하 보안취약점 수정(private 배열 처리) - * - * </pre> - */ -@SuppressWarnings("serial") -public class Sms implements Serializable { - /** 문자메시지 ID */ - private String smsId = ""; - - /** 전송 전화번호 */ - private String trnsmitTelno = ""; - - /** 전송 내용 */ - private String trnsmitCn = ""; - - /** 수신 전화번호 개수 */ - private int recptnCnt = 0; - - /** 유일 아이디 */ - private String uniqId = ""; - - /** 최초등록자 아이디 */ - private String frstRegisterId = ""; - - /** 최초 등록자명 */ - private String frstRegisterNm = ""; - - /** 최초등록시점 */ - private String frstRegisterPnttm = ""; - - /** 수신 정보 List */ - private List<SmsRecptn> recptn = null; - - /** 수전 전화번호 배열 */ - private String[] recptnTelno = null; - - /** - * smsId attribute를 리턴한다. - * @return the smsId - */ - public String getSmsId() { - return smsId; - } - - /** - * smsId attribute 값을 설정한다. - * @param smsId the smsId to set - */ - public void setSmsId(String smsId) { - this.smsId = smsId; - } - - /** - * trnsmitTelno attribute를 리턴한다. - * @return the trnsmitTelno - */ - public String getTrnsmitTelno() { - return trnsmitTelno; - } - - /** - * trnsmitTelno attribute 값을 설정한다. - * @param trnsmitTelno the trnsmitTelno to set - */ - public void setTrnsmitTelno(String trnsmitTelno) { - this.trnsmitTelno = trnsmitTelno; - } - - /** - * trnsmitCn attribute를 리턴한다. - * @return the trnsmitCn - */ - public String getTrnsmitCn() { - return trnsmitCn; - } - - /** - * trnsmitCn attribute 값을 설정한다. - * @param trnsmitCn the trnsmitCn to set - */ - public void setTrnsmitCn(String trnsmitCn) { - this.trnsmitCn = trnsmitCn; - } - - /** - * frstRegisterId attribute를 리턴한다. - * @return the frstRegisterId - */ - public String getFrstRegisterId() { - return frstRegisterId; - } - - /** - * frstRegisterId attribute 값을 설정한다. - * @param frstRegisterId the frstRegisterId to set - */ - public void setFrstRegisterId(String frstRegisterId) { - this.frstRegisterId = frstRegisterId; - } - - /** - * frstRegisterNm attribute를 리턴한다. - * @return the frstRegisterNm - */ - public String getFrstRegisterNm() { - return frstRegisterNm; - } - - /** - * frstRegisterNm attribute 값을 설정한다. - * @param frstRegisterNm the frstRegisterNm to set - */ - public void setFrstRegisterNm(String frstRegisterNm) { - this.frstRegisterNm = frstRegisterNm; - } - - /** - * frstRegisterPnttm attribute를 리턴한다. - * @return the frstRegisterPnttm - */ - public String getFrstRegisterPnttm() { - return frstRegisterPnttm; - } - - /** - * frstRegisterPnttm attribute 값을 설정한다. - * @param frstRegisterPnttm the frstRegisterPnttm to set - */ - public void setFrstRegisterPnttm(String frstRegisterPnttm) { - this.frstRegisterPnttm = frstRegisterPnttm; - } - - /** - * recptn attribute를 리턴한다. - * @return the recptn - */ - public List<SmsRecptn> getRecptn() { - return recptn; - } - - /** - * recptn attribute 값을 설정한다. - * @param recptn the recptn to set - */ - public void setRecptn(List<SmsRecptn> recptn) { - this.recptn = recptn; - } - - /** - * uniqId attribute를 리턴한다. - * @return the uniqId - */ - public String getUniqId() { - return uniqId; - } - - /** - * uniqId attribute 값을 설정한다. - * @param uniqId the uniqId to set - */ - public void setUniqId(String uniqId) { - this.uniqId = uniqId; - } - - /** - * recptnCnt attribute를 리턴한다. - * @return the recptnCnt - */ - public int getRecptnCnt() { - return recptnCnt; - } - - /** - * recptnCnt attribute 값을 설정한다. - * @param recptnCnt the recptnCnt to set - */ - public void setRecptnCnt(int recptnCnt) { - this.recptnCnt = recptnCnt; - } - - /** - * recptnTelno attribute를 리턴한다. - * @return the recptnTelno - */ -// public String[] getRecptnTelno() { -// return recptnTelno; -// } - // 2011.10.07 private 배열을 public 함수가 반환되지 않도록 함 - public String[] getRecptnTelno() { - // 메소드를 private으로 하거나, 복제본을 반환하거나, - // 수정을 제어하는 public메소드를 별도로 만든다. - String[] ret = null; - if(this.recptnTelno != null) { - ret = new String[recptnTelno.length]; - for (int i=0; i<recptnTelno.length; i++) { - ret[i] = this.recptnTelno[i]; - } - } - return ret; - } - - /** - * recptnTelno attribute 값을 설정한다. - * @param recptnTelno the recptnTelno to set - */ -// public void setRecptnTelno(String[] recptnTelno) { -// this.recptnTelno = recptnTelno; -// } - // 2011.10.07 private 배열-유형 필드에 공용 데이터 할당되지 않도록 함 - public void setRecptnTelno(String[] recptnTelno) { - this.recptnTelno = new String[recptnTelno.length]; - for (int i = 0; i < recptnTelno.length; ++i) - this.recptnTelno[i] = recptnTelno[i]; - } - - /** - * toString 메소드를 대치한다. - */ - public String toString() { - return ToStringBuilder.reflectionToString(this); - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/EgovSmsInfoService.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/EgovSmsInfoService.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/EgovSmsInfoService.java (nonexistent) @@ -1,63 +0,0 @@ -package egovframework.com.cop.sms.service; - -import java.util.Map; - -/** - * 문자메시지를 위한 서비스 인터페이스 클래스 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.18 한성곤 최초 생성 - * - * </pre> - */ -public interface EgovSmsInfoService { - /** - * 문자메시지 목록을 조회 한다. - * - * @param SmsVO - */ - public Map<String, Object> selectSmsInfs(SmsVO searchVO) throws Exception; - - /** - * 문자메시지를 전송(등록)한다. - * - * @param sms - * @throws Exception - */ - public void insertSmsInf(Sms sms) throws Exception; - - /** - * 문자메시지에 대한 상세정보를 조회한다. - * - * @param searchVO - * @return - * @throws Exception - */ - public SmsVO selectSmsInf(SmsVO searchVO) throws Exception; - - /** - * 문자메시지 실 전송을 요청한다. - * - * @param smsConn - * @return - * @throws Exception - */ - public SmsConnection sendRequsest(SmsConnection smsConn) throws Exception; - - /** - * 여러 건의 문자메시지 실 전송을 요청한다. - * - * @param smsConn - * @return - * @throws Exception - */ - public SmsConnection[] sendRequsest(SmsConnection[] smsConn) throws Exception; -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsConnection.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsConnection.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsConnection.java (nonexistent) @@ -1,183 +0,0 @@ -package egovframework.com.cop.sms.service; - -import java.io.Serializable; - -import org.apache.commons.lang3.builder.ToStringBuilder; - -/** - * 문자메시지 서비스 데이터 처리 모델 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.19 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.19 한성곤 최초 생성 - * - * </pre> - */ -@SuppressWarnings("serial") -public class SmsConnection implements Serializable { - /** 수신번호 */ - private String callTo = ""; - - /** 발신번호 */ - private String callFrom = ""; - - /** 콜백번호 */ - private String callBack = ""; - - /** 무선인터넷 주소 */ - private String callBackUrl = ""; - - /** Message */ - private String text = ""; - - /** serial 번호 : must be unique in single SME */ - private String messageId = ""; - - /** 결과코드 */ - private int result = 0; - - /** 결과메시지 */ - private String resultMessage = ""; - - /** - * callTo attribute를 리턴한다. - * @return the callTo - */ - public String getCallTo() { - return callTo; - } - - /** - * callTo attribute 값을 설정한다. - * @param callTo the callTo to set - */ - public void setCallTo(String callTo) { - this.callTo = callTo; - } - - /** - * callFrom attribute를 리턴한다. - * @return the callFrom - */ - public String getCallFrom() { - return callFrom; - } - - /** - * callFrom attribute 값을 설정한다. - * @param callFrom the callFrom to set - */ - public void setCallFrom(String callFrom) { - this.callFrom = callFrom; - } - - /** - * callBack attribute를 리턴한다. - * @return the callBack - */ - public String getCallBack() { - return callBack; - } - - /** - * callBack attribute 값을 설정한다. - * @param callBack the callBack to set - */ - public void setCallBack(String callBack) { - this.callBack = callBack; - } - - /** - * callBackUrl attribute를 리턴한다. - * @return the callBackUrl - */ - public String getCallBackUrl() { - return callBackUrl; - } - - /** - * callBackUrl attribute 값을 설정한다. - * @param callBackUrl the callBackUrl to set - */ - public void setCallBackUrl(String callBackUrl) { - this.callBackUrl = callBackUrl; - } - - /** - * text attribute를 리턴한다. - * @return the text - */ - public String getText() { - return text; - } - - /** - * text attribute 값을 설정한다. - * @param text the text to set - */ - public void setText(String text) { - this.text = text; - } - - /** - * messageId attribute를 리턴한다. - * @return the messageId - */ - public String getMessageId() { - return messageId; - } - - /** - * messageId attribute 값을 설정한다. - * @param messageId the messageId to set - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - /** - * result attribute를 리턴한다. - * @return the result - */ - public int getResult() { - return result; - } - - /** - * result attribute 값을 설정한다. - * @param result the result to set - */ - public void setResult(int result) { - this.result = result; - } - - /** - * resultMessage attribute를 리턴한다. - * @return the resultMessage - */ - public String getResultMessage() { - return resultMessage; - } - - /** - * resultMessage attribute 값을 설정한다. - * @param resultMessage the resultMessage to set - */ - public void setResultMessage(String resultMessage) { - this.resultMessage = resultMessage; - } - - /** - * toString 메소드를 대치한다. - */ - public String toString() { - return ToStringBuilder.reflectionToString(this); - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsRecptn.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsRecptn.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsRecptn.java (nonexistent) @@ -1,107 +0,0 @@ -package egovframework.com.cop.sms.service; - -import java.io.Serializable; - -import org.apache.commons.lang3.builder.ToStringBuilder; - -/** - * 문자메시지 서비스 데이터 처리 모델 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.18 한성곤 최초 생성 - * - * </pre> - */ -@SuppressWarnings("serial") -public class SmsRecptn implements Serializable { - /** 문자메시지 ID */ - private String smsId = ""; - - /** 수신 전화번호 */ - private String recptnTelno = ""; - - /** 결과코드 */ - private String resultCode = ""; - - /** 결과메시지 */ - private String resultMssage = ""; - - /** - * smsId attribute를 리턴한다. - * @return the smsId - */ - public String getSmsId() { - return smsId; - } - - /** - * smsId attribute 값을 설정한다. - * @param smsId the smsId to set - */ - public void setSmsId(String smsId) { - this.smsId = smsId; - } - - /** - * recptnTelno attribute를 리턴한다. - * @return the recptnTelno - */ - public String getRecptnTelno() { - return recptnTelno; - } - - /** - * recptnTelno attribute 값을 설정한다. - * @param recptnTelno the recptnTelno to set - */ - public void setRecptnTelno(String recptnTelno) { - this.recptnTelno = recptnTelno; - } - - /** - * resultCode attribute를 리턴한다. - * @return the resultCode - */ - public String getResultCode() { - return resultCode; - } - - /** - * resultCode attribute 값을 설정한다. - * @param resultCode the resultCode to set - */ - public void setResultCode(String resultCode) { - this.resultCode = resultCode; - } - - /** - * resultMssage attribute를 리턴한다. - * @return the resultMssage - */ - public String getResultMssage() { - return resultMssage; - } - - /** - * resultMssage attribute 값을 설정한다. - * @param resultMssage the resultMssage to set - */ - public void setResultMssage(String resultMssage) { - this.resultMssage = resultMssage; - } - - /** - * toString 메소드를 대치한다. - */ - public String toString() { - return ToStringBuilder.reflectionToString(this); - } -} Index: egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsVO.java =================================================================== --- egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsVO.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/cop/sms/service/SmsVO.java (nonexistent) @@ -1,219 +0,0 @@ -package egovframework.com.cop.sms.service; - -import org.apache.commons.lang3.builder.ToStringBuilder; - -/** - * 문자메시지 서비스를 위한 VO 클래스 - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * <pre> - * << 개정이력(Modification Information) >> - * - * 수정일 수정자 수정내용 - * ------- -------- --------------------------- - * 2009.06.18 한성곤 최초 생성 - * - * </pre> - */ -@SuppressWarnings("serial") -public class SmsVO extends Sms { - /** 검색조건 */ - private String searchCnd = ""; - - /** 검색단어 */ - private String searchWrd = ""; - - /** 정렬순서(DESC,ASC) */ - private String sortOrdr = ""; - - /** 현재페이지 */ - private int pageIndex = 1; - - /** 페이지갯수 */ - private int pageUnit = 10; - - /** 페이지사이즈 */ - private int pageSize = 10; - - /** firstIndex */ - private int firstIndex = 1; - - /** lastIndex */ - private int lastIndex = 1; - - /** recordCountPerPage */ - private int recordCountPerPage = 10; - - /** rowNo */ - private int rowNo = 0; - - /** - * searchCnd attribute를 리턴한다. - * @return the searchCnd - */ - public String getSearchCnd() { - return searchCnd; - } - - /** - * searchCnd attribute 값을 설정한다. - * @param searchCnd the searchCnd to set - */ - public void setSearchCnd(String searchCnd) { - this.searchCnd = searchCnd; - } - - /** - * searchWrd attribute를 리턴한다. - * @return the searchWrd - */ - public String getSearchWrd() { - return searchWrd; - } - - /** - * searchWrd attribute 값을 설정한다. - * @param searchWrd the searchWrd to set - */ - public void setSearchWrd(String searchWrd) { - this.searchWrd = searchWrd; - } - - /** - * sortOrdr attribute를 리턴한다. - * @return the sortOrdr - */ - public String getSortOrdr() { - return sortOrdr; - } - - /** - * sortOrdr attribute 값을 설정한다. - * @param sortOrdr the sortOrdr to set - */ - public void setSortOrdr(String sortOrdr) { - this.sortOrdr = sortOrdr; - } - - /** - * pageIndex attribute를 리턴한다. - * @return the pageIndex - */ - public int getPageIndex() { - return pageIndex; - } - - /** - * pageIndex attribute 값을 설정한다. - * @param pageIndex the pageIndex to set - */ - public void setPageIndex(int pageIndex) { - this.pageIndex = pageIndex; - } - - /** - * pageUnit attribute를 리턴한다. - * @return the pageUnit - */ - public int getPageUnit() { - return pageUnit; - } - - /** - * pageUnit attribute 값을 설정한다. - * @param pageUnit the pageUnit to set - */ - public void setPageUnit(int pageUnit) { - this.pageUnit = pageUnit; - } - - /** - * pageSize attribute를 리턴한다. - * @return the pageSize - */ - public int getPageSize() { - return pageSize; - } - - /** - * pageSize attribute 값을 설정한다. - * @param pageSize the pageSize to set - */ - public void setPageSize(int pageSize) { - this.pageSize = pageSize; - } - - /** - * firstIndex attribute를 리턴한다. - * @return the firstIndex - */ - public int getFirstIndex() { - return firstIndex; - } - - /** - * firstIndex attribute 값을 설정한다. - * @param firstIndex the firstIndex to set - */ - public void setFirstIndex(int firstIndex) { - this.firstIndex = firstIndex; - } - - /** - * lastIndex attribute를 리턴한다. - * @return the lastIndex - */ - public int getLastIndex() { - return lastIndex; - } - - /** - * lastIndex attribute 값을 설정한다. - * @param lastIndex the lastIndex to set - */ - public void setLastIndex(int lastIndex) { - this.lastIndex = lastIndex; - } - - /** - * recordCountPerPage attribute를 리턴한다. - * @return the recordCountPerPage - */ - public int getRecordCountPerPage() { - return recordCountPerPage; - } - - /** - * recordCountPerPage attribute 값을 설정한다. - * @param recordCountPerPage the recordCountPerPage to set - */ - public void setRecordCountPerPage(int recordCountPerPage) { - this.recordCountPerPage = recordCountPerPage; - } - - /** - * rowNo attribute를 리턴한다. - * @return the rowNo - */ - public int getRowNo() { - return rowNo; - } - - /** - * rowNo attribute 값을 설정한다. - * @param rowNo the rowNo to set - */ - public void setRowNo(int rowNo) { - this.rowNo = rowNo; - } - - /** - * toString 메소드를 대치한다. - */ - public String toString() { - return ToStringBuilder.reflectionToString(this); - } -} Index: egov3.10/src/main/java/egovframework/com/utl/sys/srm/service/EgovServerResrceMntrngScheduling.java =================================================================== --- egov3.10/src/main/java/egovframework/com/utl/sys/srm/service/EgovServerResrceMntrngScheduling.java (revision 4) +++ egov3.10/src/main/java/egovframework/com/utl/sys/srm/service/EgovServerResrceMntrngScheduling.java (revision 5) @@ -8,8 +8,6 @@ import java.util.NoSuchElementException; import egovframework.com.cmm.util.EgovResourceCloseHelper; -import egovframework.com.cop.sms.service.EgovSmsInfoService; -import egovframework.com.cop.sms.service.Sms; import egovframework.com.utl.fcc.service.EgovDateUtil; import egovframework.com.utl.fcc.service.EgovStringUtil; @@ -59,9 +57,6 @@ @Resource(name = "egovServerResrceMntrngService") private EgovServerResrceMntrngService egovServerResrceMntrngService; - @Resource(name = "EgovSmsInfoService") - private EgovSmsInfoService egovSmsInfoService; - @Resource(name = "mntrngMessage") private SimpleMailMessage mntrngMessage; @@ -248,14 +243,4 @@ this.mntrngMailSender.send(msg); } - public void sendSMS(ServerResrceMntrng serverResrceMntrng) throws Exception { - String[] receiveTelno = { "010-6802-0886" }; - Sms sms = new Sms(); - sms.setTrnsmitTelno("000-000-0000"); // 발신자 - sms.setRecptnTelno(receiveTelno); // 수신자 - sms.setTrnsmitCn("테스트 입니다"); - - egovSmsInfoService.insertSmsInf(sms); - } - } \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_postgres.xml =================================================================== --- egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_postgres.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_postgres.xml (nonexistent) @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="SmsDAO"> - - <resultMap id="smsList" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="recptnCnt" column="RECPTN_CNT"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsDetail" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="trnsmitCn" column="TRNSMIS_CN"/> - <result property="frstRegisterId" column="FRST_REGISTER_ID"/> - <result property="frstRegisterNm" column="FRST_REGISTER_NM"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsRecptnList" type="egovframework.com.cop.sms.service.SmsRecptn"> - <result property="smsId" column="SMS_ID"/> - <result property="recptnTelno" column="RECPTN_TELNO"/> - <result property="resultCode" column="RESULT_CODE"/> - <result property="resultMssage" column="RESULT_MSSAGE"/> - </resultMap> - - <select id="selectSmsInfs" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsList"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-mm-dd HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', #{searchWrd},'%')) - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE CONCAT ('%', #{searchWrd},'%') - </if> - - ORDER BY a.FRST_REGIST_PNTTM DESC - LIMIT #{recordCountPerPage} OFFSET #{firstIndex} - - </select> - - <select id="selectSmsInfsCnt" parameterType="egovframework.com.cop.sms.service.SmsVO" resultType="java.lang.Integer"> - - SELECT - COUNT(a.SMS_ID) - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', #{searchWrd},'%')) - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE CONCAT ('%', #{searchWrd},'%') - </if> - </select> - - <insert id="insertSmsInf" parameterType="egovframework.com.cop.sms.service.Sms"> - - INSERT INTO COMTNSMS - (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN, - FRST_REGISTER_ID, FRST_REGIST_PNTTM ) - VALUES - ( #{smsId}, #{trnsmitTelno}, #{trnsmitCn}, - #{frstRegisterId}, NOW() - ) - - </insert> - - <insert id="insertSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - INSERT INTO COMTNSMSRECPTN - (SMS_ID, RECPTN_TELNO, - RESULT_CODE, RESULT_MSSAGE ) - VALUES - ( #{smsId}, #{recptnTelno}, #{resultCode}, #{resultMssage} ) - - </insert> - - <select id="selectSmsInf" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsDetail"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-mm-dd HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - LEFT OUTER JOIN COMVNUSERMASTER b - ON a.FRST_REGISTER_ID = b.ESNTL_ID - WHERE a.SMS_ID = #{smsId} - - </select> - - <select id="selectSmsRecptnInfs" parameterType="egovframework.com.cop.sms.service.SmsRecptn" resultMap="smsRecptnList"> - - SELECT - a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE - FROM - COMTNSMSRECPTN a - WHERE a.SMS_ID = #{smsId} - - </select> - - <insert id="updateSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - UPDATE COMTNSMSRECPTN SET - RESULT_CODE = #{resultCode}, - RESULT_MSSAGE = #{resultMssage} - WHERE - SMS_ID = #{smsId} AND - RECPTN_TELNO = #{recptnTelno} - - </insert> - -</mapper> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_cubrid.xml =================================================================== --- egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_cubrid.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_cubrid.xml (nonexistent) @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="SmsDAO"> - - <resultMap id="smsList" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="recptnCnt" column="RECPTN_CNT"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsDetail" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="trnsmitCn" column="TRNSMIS_CN"/> - <result property="frstRegisterId" column="FRST_REGISTER_ID"/> - <result property="frstRegisterNm" column="FRST_REGISTER_NM"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsRecptnList" type="egovframework.com.cop.sms.service.SmsRecptn"> - <result property="smsId" column="SMS_ID"/> - <result property="recptnTelno" column="RECPTN_TELNO"/> - <result property="resultCode" column="RESULT_CODE"/> - <result property="resultMssage" column="RESULT_MSSAGE"/> - </resultMap> - - <select id="selectSmsInfs" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsList"> - - SELECT * FROM ( SELECT rownum rn, TB.* FROM ( - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - - ORDER BY a.FRST_REGIST_PNTTM DESC - ) TB ) Z WHERE rn BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - </select> - - <select id="selectSmsInfsCnt" parameterType="egovframework.com.cop.sms.service.SmsVO" resultType="java.lang.Integer"> - - SELECT - COUNT(a.SMS_ID) - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - </select> - - <insert id="insertSmsInf" parameterType="egovframework.com.cop.sms.service.Sms"> - - INSERT INTO COMTNSMS - (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN, - FRST_REGISTER_ID, FRST_REGIST_PNTTM ) - VALUES - ( #{smsId}, #{trnsmitTelno}, #{trnsmitCn}, - #{frstRegisterId}, SYSDATETIME - ) - - </insert> - - <insert id="insertSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - INSERT INTO COMTNSMSRECPTN - (SMS_ID, RECPTN_TELNO, - RESULT_CODE, RESULT_MSSAGE ) - VALUES - ( #{smsId}, #{recptnTelno}, #{resultCode}, #{resultMssage} ) - - </insert> - - <select id="selectSmsInf" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsDetail"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - LEFT OUTER JOIN COMVNUSERMASTER b - ON a.FRST_REGISTER_ID = b.ESNTL_ID - WHERE a.SMS_ID = #{smsId} - - </select> - - <select id="selectSmsRecptnInfs" parameterType="egovframework.com.cop.sms.service.SmsRecptn" resultMap="smsRecptnList"> - - SELECT - a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE - FROM - COMTNSMSRECPTN a - WHERE a.SMS_ID = #{smsId} - - </select> - - <insert id="updateSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - UPDATE COMTNSMSRECPTN SET - RESULT_CODE = #{resultCode}, - RESULT_MSSAGE = #{resultMssage} - WHERE - SMS_ID = #{smsId} AND - RECPTN_TELNO = #{recptnTelno} - - </insert> - -</mapper> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_oracle.xml =================================================================== --- egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_oracle.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_oracle.xml (nonexistent) @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="SmsDAO"> - - <resultMap id="smsList" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="recptnCnt" column="RECPTN_CNT"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsDetail" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="trnsmitCn" column="TRNSMIS_CN"/> - <result property="frstRegisterId" column="FRST_REGISTER_ID"/> - <result property="frstRegisterNm" column="FRST_REGISTER_NM"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsRecptnList" type="egovframework.com.cop.sms.service.SmsRecptn"> - <result property="smsId" column="SMS_ID"/> - <result property="recptnTelno" column="RECPTN_TELNO"/> - <result property="resultCode" column="RESULT_CODE"/> - <result property="resultMssage" column="RESULT_MSSAGE"/> - </resultMap> - - <select id="selectSmsInfs" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsList"> - - SELECT * FROM ( SELECT rownum rn, TB.* FROM ( - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - - ORDER BY a.FRST_REGIST_PNTTM DESC - ) TB ) WHERE rn BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - </select> - - <select id="selectSmsInfsCnt" parameterType="egovframework.com.cop.sms.service.SmsVO" resultType="java.lang.Integer"> - - SELECT - COUNT(a.SMS_ID) - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - </select> - - <insert id="insertSmsInf" parameterType="egovframework.com.cop.sms.service.Sms"> - - INSERT INTO COMTNSMS - (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN, - FRST_REGISTER_ID, FRST_REGIST_PNTTM ) - VALUES - ( #{smsId}, #{trnsmitTelno}, #{trnsmitCn}, - #{frstRegisterId}, SYSDATE - ) - - </insert> - - <insert id="insertSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - INSERT INTO COMTNSMSRECPTN - (SMS_ID, RECPTN_TELNO, - RESULT_CODE, RESULT_MSSAGE ) - VALUES - ( #{smsId}, #{recptnTelno}, #{resultCode}, #{resultMssage} ) - - </insert> - - <select id="selectSmsInf" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsDetail"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - LEFT OUTER JOIN COMVNUSERMASTER b - ON a.FRST_REGISTER_ID = b.ESNTL_ID - WHERE a.SMS_ID = #{smsId} - - </select> - - <select id="selectSmsRecptnInfs" parameterType="egovframework.com.cop.sms.service.SmsRecptn" resultMap="smsRecptnList"> - - SELECT - a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE - FROM - COMTNSMSRECPTN a - WHERE a.SMS_ID = #{smsId} - - </select> - - <insert id="updateSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - UPDATE COMTNSMSRECPTN SET - RESULT_CODE = #{resultCode}, - RESULT_MSSAGE = #{resultMssage} - WHERE - SMS_ID = #{smsId} AND - RECPTN_TELNO = #{recptnTelno} - - </insert> - -</mapper> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_altibase.xml =================================================================== --- egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_altibase.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_altibase.xml (nonexistent) @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="SmsDAO"> - - <resultMap id="smsList" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="recptnCnt" column="RECPTN_CNT"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsDetail" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="trnsmitCn" column="TRNSMIS_CN"/> - <result property="frstRegisterId" column="FRST_REGISTER_ID"/> - <result property="frstRegisterNm" column="FRST_REGISTER_NM"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsRecptnList" type="egovframework.com.cop.sms.service.SmsRecptn"> - <result property="smsId" column="SMS_ID"/> - <result property="recptnTelno" column="RECPTN_TELNO"/> - <result property="resultCode" column="RESULT_CODE"/> - <result property="resultMssage" column="RESULT_MSSAGE"/> - </resultMap> - - <select id="selectSmsInfs" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsList"> - - SELECT * FROM ( SELECT rownum rn, TB.* FROM ( - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - - ORDER BY a.FRST_REGIST_PNTTM DESC - ) TB ) WHERE rn BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - </select> - - <select id="selectSmsInfsCnt" parameterType="egovframework.com.cop.sms.service.SmsVO" resultType="java.lang.Integer"> - - SELECT - COUNT(a.SMS_ID) as cnt - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - </select> - - <insert id="insertSmsInf" parameterType="egovframework.com.cop.sms.service.Sms"> - - INSERT INTO COMTNSMS - (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN, - FRST_REGISTER_ID, FRST_REGIST_PNTTM ) - VALUES - ( #{smsId}, #{trnsmitTelno}, #{trnsmitCn}, - #{frstRegisterId}, SYSDATE - ) - - </insert> - - <insert id="insertSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - INSERT INTO COMTNSMSRECPTN - (SMS_ID, RECPTN_TELNO, - RESULT_CODE, RESULT_MSSAGE ) - VALUES - ( #{smsId}, #{recptnTelno}, #{resultCode}, #{resultMssage} ) - - </insert> - - <select id="selectSmsInf" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsDetail"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - LEFT OUTER JOIN COMVNUSERMASTER b - ON a.FRST_REGISTER_ID = b.ESNTL_ID - WHERE a.SMS_ID = #{smsId} - - </select> - - <select id="selectSmsRecptnInfs" parameterType="egovframework.com.cop.sms.service.SmsRecptn" resultMap="smsRecptnList"> - - SELECT - a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE - FROM - COMTNSMSRECPTN a - WHERE a.SMS_ID = #{smsId} - - </select> - - <insert id="updateSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - UPDATE COMTNSMSRECPTN SET - RESULT_CODE = #{resultCode}, - RESULT_MSSAGE = #{resultMssage} - WHERE - SMS_ID = #{smsId} AND - RECPTN_TELNO = #{recptnTelno} - - </insert> - -</mapper> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_mysql.xml =================================================================== --- egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_mysql.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_mysql.xml (nonexistent) @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="SmsDAO"> - - <resultMap id="smsList" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="recptnCnt" column="RECPTN_CNT"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsDetail" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="trnsmitCn" column="TRNSMIS_CN"/> - <result property="frstRegisterId" column="FRST_REGISTER_ID"/> - <result property="frstRegisterNm" column="FRST_REGISTER_NM"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsRecptnList" type="egovframework.com.cop.sms.service.SmsRecptn"> - <result property="smsId" column="SMS_ID"/> - <result property="recptnTelno" column="RECPTN_TELNO"/> - <result property="resultCode" column="RESULT_CODE"/> - <result property="resultMssage" column="RESULT_MSSAGE"/> - </resultMap> - - <select id="selectSmsInfs" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsList"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT, - DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i:%S') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', #{searchWrd},'%')) - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE CONCAT ('%', #{searchWrd},'%') - </if> - - ORDER BY a.FRST_REGIST_PNTTM DESC - LIMIT #{recordCountPerPage} OFFSET #{firstIndex} - - </select> - - <select id="selectSmsInfsCnt" parameterType="egovframework.com.cop.sms.service.SmsVO" resultType="java.lang.Integer"> - - SELECT - COUNT(a.SMS_ID) - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', #{searchWrd},'%')) - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE CONCAT ('%', #{searchWrd},'%') - </if> - </select> - - <insert id="insertSmsInf" parameterType="egovframework.com.cop.sms.service.Sms"> - - INSERT INTO COMTNSMS - (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN, - FRST_REGISTER_ID, FRST_REGIST_PNTTM ) - VALUES - ( #{smsId}, #{trnsmitTelno}, #{trnsmitCn}, - #{frstRegisterId}, SYSDATE() - ) - - </insert> - - <insert id="insertSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - INSERT INTO COMTNSMSRECPTN - (SMS_ID, RECPTN_TELNO, - RESULT_CODE, RESULT_MSSAGE ) - VALUES - ( #{smsId}, #{recptnTelno}, #{resultCode}, #{resultMssage} ) - - </insert> - - <select id="selectSmsInf" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsDetail"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM, - DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i:%S') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - LEFT OUTER JOIN COMVNUSERMASTER b - ON a.FRST_REGISTER_ID = b.ESNTL_ID - WHERE a.SMS_ID = #{smsId} - - </select> - - <select id="selectSmsRecptnInfs" parameterType="egovframework.com.cop.sms.service.SmsRecptn" resultMap="smsRecptnList"> - - SELECT - a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE - FROM - COMTNSMSRECPTN a - WHERE a.SMS_ID = #{smsId} - - </select> - - <insert id="updateSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - UPDATE COMTNSMSRECPTN SET - RESULT_CODE = #{resultCode}, - RESULT_MSSAGE = #{resultMssage} - WHERE - SMS_ID = #{smsId} AND - RECPTN_TELNO = #{recptnTelno} - - </insert> - -</mapper> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_tibero.xml =================================================================== --- egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_tibero.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_tibero.xml (nonexistent) @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="SmsDAO"> - - <resultMap id="smsList" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="recptnCnt" column="RECPTN_CNT"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsDetail" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="trnsmitCn" column="TRNSMIS_CN"/> - <result property="frstRegisterId" column="FRST_REGISTER_ID"/> - <result property="frstRegisterNm" column="FRST_REGISTER_NM"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsRecptnList" type="egovframework.com.cop.sms.service.SmsRecptn"> - <result property="smsId" column="SMS_ID"/> - <result property="recptnTelno" column="RECPTN_TELNO"/> - <result property="resultCode" column="RESULT_CODE"/> - <result property="resultMssage" column="RESULT_MSSAGE"/> - </resultMap> - - <select id="selectSmsInfs" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsList"> - - SELECT * FROM ( SELECT rownum rn, TB.* FROM ( - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - - ORDER BY a.FRST_REGIST_PNTTM DESC - ) TB ) WHERE rn BETWEEN #{firstIndex} + 1 AND #{firstIndex} + #{recordCountPerPage} - - </select> - - <select id="selectSmsInfsCnt" parameterType="egovframework.com.cop.sms.service.SmsVO" resultType="java.lang.Integer"> - - SELECT - COUNT(a.SMS_ID) - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE '%' || #{searchWrd} || '%') - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE '%' || #{searchWrd} || '%' - </if> - </select> - - <insert id="insertSmsInf" parameterType="egovframework.com.cop.sms.service.Sms"> - - INSERT INTO COMTNSMS - (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN, - FRST_REGISTER_ID, FRST_REGIST_PNTTM ) - VALUES - ( #{smsId}, #{trnsmitTelno}, #{trnsmitCn}, - #{frstRegisterId}, SYSDATE - ) - - </insert> - - <insert id="insertSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - INSERT INTO COMTNSMSRECPTN - (SMS_ID, RECPTN_TELNO, - RESULT_CODE, RESULT_MSSAGE ) - VALUES - ( #{smsId}, #{recptnTelno}, #{resultCode}, #{resultMssage} ) - - </insert> - - <select id="selectSmsInf" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsDetail"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM, - TO_CHAR(a.FRST_REGIST_PNTTM, 'YYYY-MM-DD HH24:MI:SS') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - LEFT OUTER JOIN COMVNUSERMASTER b - ON a.FRST_REGISTER_ID = b.ESNTL_ID - WHERE a.SMS_ID = #{smsId} - - </select> - - <select id="selectSmsRecptnInfs" parameterType="egovframework.com.cop.sms.service.SmsRecptn" resultMap="smsRecptnList"> - - SELECT - a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE - FROM - COMTNSMSRECPTN a - WHERE a.SMS_ID = #{smsId} - - </select> - - <insert id="updateSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - UPDATE COMTNSMSRECPTN SET - RESULT_CODE = #{resultCode}, - RESULT_MSSAGE = #{resultMssage} - WHERE - SMS_ID = #{smsId} AND - RECPTN_TELNO = #{recptnTelno} - - </insert> - -</mapper> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_maria.xml =================================================================== --- egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_maria.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/mapper/com/cop/sms/EgovSms_SQL_maria.xml (nonexistent) @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="SmsDAO"> - - <resultMap id="smsList" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="recptnCnt" column="RECPTN_CNT"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsDetail" type="egovframework.com.cop.sms.service.SmsVO"> - <result property="smsId" column="SMS_ID"/> - <result property="trnsmitTelno" column="TRNSMIS_TELNO"/> - <result property="trnsmitCn" column="TRNSMIS_CN"/> - <result property="frstRegisterId" column="FRST_REGISTER_ID"/> - <result property="frstRegisterNm" column="FRST_REGISTER_NM"/> - <result property="frstRegisterPnttm" column="FRST_REGIST_PNTTM"/> - </resultMap> - - <resultMap id="smsRecptnList" type="egovframework.com.cop.sms.service.SmsRecptn"> - <result property="smsId" column="SMS_ID"/> - <result property="recptnTelno" column="RECPTN_TELNO"/> - <result property="resultCode" column="RESULT_CODE"/> - <result property="resultMssage" column="RESULT_MSSAGE"/> - </resultMap> - - <select id="selectSmsInfs" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsList"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - (SELECT COUNT(*) FROM COMTNSMSRECPTN s WHERE s.SMS_ID = a.SMS_ID) as RECPTN_CNT, - DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i:%S') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', #{searchWrd},'%')) - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE CONCAT ('%', #{searchWrd},'%') - </if> - - ORDER BY a.FRST_REGIST_PNTTM DESC - LIMIT #{recordCountPerPage} OFFSET #{firstIndex} - - </select> - - <select id="selectSmsInfsCnt" parameterType="egovframework.com.cop.sms.service.SmsVO" resultType="java.lang.Integer"> - - SELECT - COUNT(a.SMS_ID) - FROM - COMTNSMS a - WHERE 1=1 - - <if test="searchCnd == 0">AND - - - a.SMS_ID in (SELECT SMS_ID FROM COMTNSMSRECPTN WHERE RECPTN_TELNO LIKE CONCAT ('%', #{searchWrd},'%')) - - - </if> - <if test="searchCnd == 1">AND - a.TRNSMIS_CN LIKE CONCAT ('%', #{searchWrd},'%') - </if> - </select> - - <insert id="insertSmsInf" parameterType="egovframework.com.cop.sms.service.Sms"> - - INSERT INTO COMTNSMS - (SMS_ID, TRNSMIS_TELNO, TRNSMIS_CN, - FRST_REGISTER_ID, FRST_REGIST_PNTTM ) - VALUES - ( #{smsId}, #{trnsmitTelno}, #{trnsmitCn}, - #{frstRegisterId}, SYSDATE() - ) - - </insert> - - <insert id="insertSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - INSERT INTO COMTNSMSRECPTN - (SMS_ID, RECPTN_TELNO, - RESULT_CODE, RESULT_MSSAGE ) - VALUES - ( #{smsId}, #{recptnTelno}, #{resultCode}, #{resultMssage} ) - - </insert> - - <select id="selectSmsInf" parameterType="egovframework.com.cop.sms.service.SmsVO" resultMap="smsDetail"> - - SELECT - a.SMS_ID, a.TRNSMIS_TELNO, a.TRNSMIS_CN, - a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM, - DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i:%S') as FRST_REGIST_PNTTM - FROM - COMTNSMS a - LEFT OUTER JOIN COMVNUSERMASTER b - ON a.FRST_REGISTER_ID = b.ESNTL_ID - WHERE a.SMS_ID = #{smsId} - - </select> - - <select id="selectSmsRecptnInfs" parameterType="egovframework.com.cop.sms.service.SmsRecptn" resultMap="smsRecptnList"> - - SELECT - a.SMS_ID, a.RECPTN_TELNO, a.RESULT_CODE, a.RESULT_MSSAGE - FROM - COMTNSMSRECPTN a - WHERE a.SMS_ID = #{smsId} - - </select> - - <insert id="updateSmsRecptnInf" parameterType="egovframework.com.cop.sms.service.SmsRecptn"> - - UPDATE COMTNSMSRECPTN SET - RESULT_CODE = #{resultCode}, - RESULT_MSSAGE = #{resultMssage} - WHERE - SMS_ID = #{smsId} AND - RECPTN_TELNO = #{recptnTelno} - - </insert> - -</mapper> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/validator/com/cop/sms/EgovSmsInfoRegist.xml =================================================================== --- egov3.10/src/main/resources/egovframework/validator/com/cop/sms/EgovSmsInfoRegist.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/validator/com/cop/sms/EgovSmsInfoRegist.xml (nonexistent) @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE form-validation PUBLIC - "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN" - "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd"> - -<form-validation> - - <formset> - <form name="sms"> - <field property="trnsmitTelno" depends="required"> - <arg0 key="cop.sms.trnsmitTelno" /> - </field> - <field property="trnsmitCn" depends="required, maxlength"> - <arg0 key="cop.sms.trnsmitCn" /> - <arg1 key="80" resource="true"/> - <var> - <var-name>maxlength</var-name> - <var-value>80</var-value> - </var> - </field> - <field property="recptnTelno" depends="required"> - <arg0 key="cop.sms.recptnTelno" /> - </field> - </form> - </formset> -</form-validation> \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/message/com/cop/sms/message_en.properties =================================================================== --- egov3.10/src/main/resources/egovframework/message/com/cop/sms/message_en.properties (revision 4) +++ egov3.10/src/main/resources/egovframework/message/com/cop/sms/message_en.properties (nonexistent) @@ -1,16 +0,0 @@ -#UI COP Message# -cop.sms.trnsmitTelno=Sender -cop.sms.trnsmitCn=Contents -cop.sms.recptnTelno=Receiver(s) -cop.sms.send=Send -cop.sms.addRecptn=Add -cop.sms.recptnTelno.msg=The phone number of receiver is required. - -cop.sms.textMassageList=SMS Service List -cop.sms.textMassageRegist=SMS Service Regist -cop.sms.textMassageDetail=SMS Service Detail -cop.sms.trnsmitTelno=Outgoing phone number -cop.sms.recptnCnt=Number of incoming phone numbers -cop.sms.frstRegisterPnttm=Transmission date and time -cop.sms.frstRegisterNm=Sender -cop.sms.recptnResult=Receive and transmit results \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/message/com/cop/sms/message_ko.properties =================================================================== --- egov3.10/src/main/resources/egovframework/message/com/cop/sms/message_ko.properties (revision 4) +++ egov3.10/src/main/resources/egovframework/message/com/cop/sms/message_ko.properties (nonexistent) @@ -1,16 +0,0 @@ -#UI COP Message# -cop.sms.trnsmitTelno=\ubc1c\uc2e0\uc804\ud654\ubc88\ud638 -cop.sms.trnsmitCn=\uc804\uc1a1\ub0b4\uc6a9 -cop.sms.recptnTelno=\uc218\uc2e0\uc804\ud654\ubc88\ud638 -cop.sms.send=\uc804\uc1a1 -cop.sms.addRecptn=\ucd94\uac00 -cop.sms.recptnTelno.msg=\uc218\uc2e0\uc804\ud654\ubc88\ud638 \uc9c0\uc815\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. - -cop.sms.textMassageList=\ubb38\uc790\uba54\uc2dc\uc9c0 \ubaa9\ub85d -cop.sms.textMassageRegist=\ubb38\uc790\uba54\uc2dc\uc9c0 \ub4f1\ub85d -cop.sms.textMassageDetail=\ubb38\uc790\uba54\uc2dc\uc9c0 \uc0c1\uc138\ubcf4\uae30 -cop.sms.trnsmitTelno=\ubc1c\uc2e0\uc804\ud654\ubc88\ud638 -cop.sms.recptnCnt=\uc218\uc2e0\uc804\ud654\ubc88\ud638 \uc218 -cop.sms.frstRegisterPnttm=\uc804\uc1a1\uc77c\uc2dc -cop.sms.frstRegisterNm=\uc804\uc1a1\uc790 -cop.sms.recptnResult=\uc218\uc2e0 \ubc0f \uc804\uc1a1\uacb0\uacfc \ No newline at end of file Index: egov3.10/src/main/resources/egovframework/spring/com/scheduling/context-scheduling-cop-sms.xml =================================================================== --- egov3.10/src/main/resources/egovframework/spring/com/scheduling/context-scheduling-cop-sms.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/spring/com/scheduling/context-scheduling-cop-sms.xml (nonexistent) @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"> - - <!-- SMS 전송 결과 수신 처리 --> - <bean id="smsInfoReceiver" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> - <property name="targetObject" ref="EgovSmsInfoReceiver" /> - <property name="targetMethod" value="execute" /> - <property name="concurrent" value="false" /> - </bean> - - <bean id="smsInfoReceiverTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"> - <property name="jobDetail" ref="smsInfoReceiver" /> - <!-- 시작하고 1분후에 실행한다. (milisecond) --> - <property name="startDelay" value="60000" /> - <!-- 매 60초마다 실행한다. (milisecond) 데몬 형식으로 계속 기동 중 --> - <property name="repeatInterval" value="60000" /> - </bean> - - <!-- 배포용인 경우 제외 SMS 서비스 제외 --> - <!-- - <bean id="smsInfoReceiverScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> - <property name="triggers"> - <list> - <ref bean="smsInfoReceiverTrigger" /> - </list> - </property> - </bean> - --> - -</beans> Index: egov3.10/src/main/resources/egovframework/spring/com/idgn/context-idgn-Sms.xml =================================================================== --- egov3.10/src/main/resources/egovframework/spring/com/idgn/context-idgn-Sms.xml (revision 4) +++ egov3.10/src/main/resources/egovframework/spring/com/idgn/context-idgn-Sms.xml (nonexistent) @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"> - - <bean name="egovSmsIdGnrService" class="egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl" destroy-method="destroy"> - <property name="dataSource" ref="egov.dataSource" /> - <property name="strategy" ref="smsStrategy" /> - <property name="blockSize" value="10"/> - <property name="table" value="COMTECOPSEQ"/> - <property name="tableName" value="SMS_ID"/> - </bean> - <bean name="smsStrategy" class="egovframework.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl"> - <property name="prefix" value="SMS_" /> - <property name="cipers" value="16" /> - <property name="fillChar" value="0" /> - </bean> - -</beans> \ No newline at end of file Index: egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoList.jsp =================================================================== --- egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoList.jsp (revision 4) +++ egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoList.jsp (nonexistent) @@ -1,137 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<% - /** - * @Class Name : EgovSmsInfoList.jsp - * @Description : 문자메시지 목록화면 - * @Modification Information - * @ - * @ 수정일 수정자 수정내용 - * @ ------- -------- --------------------------- - * @ 2009.06.18 한성곤 최초 생성 - * @ 2018.09.20 이정은 공통컴포넌트 3.8 개선 - * - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * Copyright (C) 2009 by MOPAS All right reserved. - */ -%> -<!DOCTYPE html> -<html lang="ko"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<link href="<c:url value='/css/egovframework/com/com.css' />" rel="stylesheet" type="text/css"> -<link href="<c:url value='/css/egovframework/com/button.css' />" rel="stylesheet" type="text/css"> -<script type="text/javascript"> - function press(event) { - if (event.keyCode==13) { - fn_egov_select_sms('1'); - } - } - - function fn_egov_insert_sms() { - document.frm.action = "<c:url value='/cop/sms/addSms.do'/>"; - document.frm.submit(); - } - - function fn_egov_select_sms(pageNo) { - document.frm.pageIndex.value = pageNo; - document.frm.action = "<c:url value='/cop/sms/selectSmsList.do'/>"; - document.frm.submit(); - } - - function fn_egov_inqire_sms(smsId) { - document.frm.smsId.value = smsId; - document.frm.action = "<c:url value='/cop/sms/selectSms.do'/>"; - document.frm.submit(); - } -</script> -<title><spring:message code="cop.sms.textMassageList"/></title><!-- 문자메시지 목록 --> - -<style type="text/css"> - h1 {font-size:12px;} - caption {visibility:hidden; font-size:0; height:0; margin:0; padding:0; line-height:0;} -</style> - - -</head> -<body> - -<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript><!-- 자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다. --> - -<div class="board"> - <h1><spring:message code="cop.sms.textMassageList"/></h1><!-- 문자메시지 목록 --> - <form name="frm" method="post" action="<c:url value='/cop/sms/selectSmsList.do'/>"> - <input type="hidden" name="smsId" value="<c:out value=""/>"> - <input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>"> - - - <div class="search_box" title="<spring:message code="common.searchCondition.msg" />"><!-- 이 레이아웃은 하단 정보를 대한 검색 정보로 구성되어 있습니다. --> - <ul> - <li> - <select name="searchCnd" title="<spring:message code="select.searchCondition"/>"><!-- 검색조건선택 --> - <option value=''>--<spring:message code="input.select"/>--</option><!-- 선택하세요 --> - <option value="0" <c:if test="${searchVO.searchCnd == '0'}">selected="selected"</c:if> ><spring:message code="cop.sms.recptnTelno"/></option><!-- 수신전화번호 --> - <option value="1" <c:if test="${searchVO.searchCnd == '1'}">selected="selected"</c:if> ><spring:message code="cop.sms.trnsmitCn"/></option><!-- 전송내용 --> - </select> - <input class="s_input2 vat" type="text" name="searchWrd" size="35" value='<c:out value="${searchVO.searchWrd}"/>' maxlength="35" onkeypress="press(event);" title="<spring:message code="title.search"/>" /><!-- 검색단어입력 --> - - <input class="s_btn" type="submit" value="<spring:message code="button.inquire"/>" title="<spring:message code="button.inquire"/>" onclick="fn_egov_select_sms('1'); return false;" /><!-- 조회 --> - <span class="s_btn"><a href="<c:url value='/cop/sms/addSms.do'/>?pageIndex=<c:out value='${searchVO.pageIndex}'/>" onclick="fn_egov_insert_sms(); return false;"><spring:message code="cop.sms.send"/></a></span><!-- 전송 --> - </li> - </ul> - </div> - </form> - - <table class="board_list"> - <caption><spring:message code="cop.sms.textMassageList"/></caption><!-- 문자메시지 목록 --> - <colgroup> - <col style="width:20%" /> - <col style="" /> - <col style="" /> - <col style="" /> - </colgroup> - <thead> - <tr> - <th scope="col"><spring:message code="table.num"/></th><!-- 번호 --> - <th scope="col"><spring:message code="cop.sms.frstRegisterPnttm"/></th><!-- 전송일시 --> - <th scope="col"><spring:message code="cop.sms.trnsmitTelno"/></th><!-- 발신전화번호 --> - <th scope="col"><spring:message code="cop.sms.recptnCnt"/></th><!-- 수신전화번호수 --> - </tr> - </thead> - <tbody> - <c:forEach var="result" items="${resultList}" varStatus="status"> - <tr> - <td><c:out value="${(searchVO.pageIndex-1) * searchVO.pageSize + status.count}"/></td> - <td> - <a href="<c:url value='/cop/sms/selectSms.do'/>?smsId=${result.smsId}&pageIndex=${searchVO.pageIndex}" onClick="fn_egov_inqire_sms('<c:out value="${result.smsId}"/>');return false;"><c:out value='${result.frstRegisterPnttm}'/></a> - - </td> - <td><c:out value="${result.trnsmitTelno}"/></td> - <td><c:out value="${result.recptnCnt}"/></td> - </tr> - </c:forEach> - <c:if test="${fn:length(resultList) == 0}"> - <tr> - <td colspan="4"><spring:message code="common.nodata.msg" /></td> - </tr> - </c:if> - </tbody> - </table> - - <!-- paging navigation --> - <div class="pagination"> - <ul> - <ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_egov_select_sms"/> - </ul> - </div> -</div> - -</body> -</html> Index: egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoDetail.jsp =================================================================== --- egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoDetail.jsp (revision 4) +++ egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoDetail.jsp (nonexistent) @@ -1,114 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<% -/** - * @Class Name : EgovSmsInfoInqire.jsp - * @Description : 문자메시지 상세조회 - * @Modification Information - * @ - * @ 수정일 수정자 수정내용 - * @ ------- -------- --------------------------- - * @ 2009.06.19 한성곤 최초 생성 - * @ 2018.09.21 이정은 공통컴포넌트 3.8 개선 - * - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.19 - * @version 1.0 - * @see - * - * Copyright (C) 2009 by MOPAS All right reserved. - */ -%> -<!DOCTYPE html> -<html lang="ko"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<link href="<c:url value='/css/egovframework/com/com.css' />" rel="stylesheet" type="text/css"> -<link href="<c:url value='/css/egovframework/com/button.css' />" rel="stylesheet" type="text/css"> -<script type="text/javascript"> - function fn_egov_select_smsList(pageNo) { - document.frm.pageIndex.value = pageNo; - document.frm.action = "<c:url value='/cop/sms/selectSmsList.do'/>"; - document.frm.submit(); - } -</script> -<title><spring:message code="cop.sms.textMassageDetail"/></title><!-- 문자메시지 상세보기 --> - -<style type="text/css"> - h1 {font-size:12px;} - caption {visibility:hidden; font-size:0; height:0; margin:0; padding:0; line-height:0;} -</style> - - -</head> -<body> - -<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript><!-- 자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다. --> - -<div class="wTableFrm"> - <!-- 타이틀 --> - <h2><spring:message code="cop.sms.textMassageDetail"/></h2><!-- 문자메시지 상세보기 --> - - <form name="frm" method="post" action="<c:url value='/cop/sms/selectSmsList.do'/>"> - - <input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>"> - <input type="hidden" name="smsId" value="<c:out value='${result.smsId}'/>" > - - <!-- 등록폼 --> - <table class="wTable"> - <colgroup> - <col style="width:16%;" /> - <col style="" /> - <col style="width:16%;" /> - <col style="" /> - </colgroup> - <tr> - <th><spring:message code="cop.sms.trnsmitTelno"/></th><!-- 발신전화번호 --> - <td class="left" colspan="3"> - <c:out value="${result.trnsmitTelno}" /> - </td> - </tr> - <tr> - <th><spring:message code="cop.sms.trnsmitCn"/></th><!-- 전송내용 --> - <td class="left" colspan="3"> - <c:out value="${result.trnsmitCn}" /> - </td> - </tr> - <tr> - <th><spring:message code="cop.sms.recptnResult"/></th><!-- 수신 및 전송결과 --> - <td class="left" colspan="3"> - <ul> - <c:forEach var="recptn" items="${result.recptn}" varStatus="status"> - <li> - <c:out value='${recptn.recptnTelno}'/> : (<c:out value='${recptn.resultCode}'/>) <c:out value='${recptn.resultMssage}'/> - </li> - </c:forEach> - </ul> - </td> - </tr> - <tr> - <th><spring:message code="cop.sms.frstRegisterNm"/></th><!-- 전송자 --> - <td class="left"> - <c:out value="${result.frstRegisterNm}" /> - </td> - <th><spring:message code="cop.sms.frstRegisterPnttm"/></th><!-- 전송일시 --> - <td class="left"> - <c:out value="${result.frstRegisterPnttm}" /> - </td> - </tr> - </table> - - <!-- 하단 버튼 --> - <div class="btn"> - <span class="btn_s"><a href="<c:url value='/cop/sms/selectSmsList.do'/>?pageIndex=1" onclick="fn_egov_select_smsList('1'); return false;"><spring:message code="button.list"/></a></span><!-- 목록 --> - </div> - <div style="clear:both;"></div> - - </form> -</div> - -</body> -</html> Index: egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoRegist.jsp =================================================================== --- egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoRegist.jsp (revision 4) +++ egov3.10/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/sms/EgovSmsInfoRegist.jsp (nonexistent) @@ -1,145 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> -<% -/** - * @Class Name : EgovSmsInfoRegist.jsp - * @Description : 문자메시지 등록화면 - * @Modification Information - * @ - * @ 수정일 수정자 수정내용 - * @ ------- -------- --------------------------- - * @ 2009.06.18 한성곤 최초 생성 - * @ 2018.09.14 이정은 공통컴포넌트 3.8 개선 - * - * @author 공통컴포넌트개발팀 한성곤 - * @since 2009.06.18 - * @version 1.0 - * @see - * - * Copyright (C) 2009 by MOPAS All right reserved. - */ -%> -<!DOCTYPE html> -<html lang="ko"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<title><spring:message code="cop.sms.textMassageRegist"/></title><!-- 문자메시지 등록 --> -<link href="<c:url value="/css/egovframework/com/com.css"/>" rel="stylesheet" type="text/css"> -<link href="<c:url value="/css/egovframework/com/button.css"/>" rel="stylesheet" type="text/css"> -<script type="text/javascript" src="<c:url value="/validator.do"/>"></script> -<validator:javascript formName="sms" staticJavascript="false" xhtml="true" cdata="false"/> - -<c:choose> -<c:when test="${not empty msg}"> -<script type="text/javascript"> -function loading() { - alert("<c:out value='${msg}'/>"); -} -</script> -</c:when> -<c:otherwise> -<script type="text/javascript"> -function loading() { - // no-op -} -</script> -</c:otherwise> -</c:choose> - -<script type="text/javascript"> - function fn_egov_regist_sms() { - if (!validateSms(document.sms)){ - return; - } - - var checked = false; - for (var i = 0; i < document.sms.recptnTelno.length; i++) { - if (document.sms.recptnTelno[i].value != '') { - checked = true; - break; - } - } - - if (!checked) { - alert('<spring:message code="cop.sms.recptnTelno.msg" />'); - document.sms.recptnTelno[0].focus(); - return; - } - - if (confirm('<spring:message code="common.regist.msg" />')) { - form = document.sms; - form.action = "<c:url value='/cop/sms/insertSms.do'/>"; - - form.submit(); - } - } - - function fn_egov_select_sms() { - form = document.sms; - form.action = "<c:url value='/cop/sms/selectSmsList.do'/>"; - form.submit(); - } - -</script> -</head> -<body onload="loading();"> - -<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript><!-- 자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다. --> - -<form:form commandName="sms" name="sms" method="post" action="${pageContext.request.contextPath}/cop/sms/insertSms.do' />"> - -<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"> - -<div class="wTableFrm"> - <!-- 타이틀 --> - <h2><spring:message code="cop.sms.textMassageRegist"/></h2><!-- 문자메시지 전송 --> - - <!-- 등록폼 --> - <table class="wTable"> - <colgroup> - <col style="width:16%" /> - <col style="" /> - </colgroup> - <tr> - <th><spring:message code="cop.sms.trnsmitTelno" /> <span class="pilsu">*</span></th> - <td class="left"> - <form:input path="trnsmitTelno" size="14" maxlength="14" cssStyle="width:100%" /> - <br /><form:errors path="trnsmitTelno" /> - </td> - </tr> - <tr> - <th><spring:message code="cop.sms.trnsmitCn" /> <span class="pilsu">*</span></th> - <td class="left"> - <form:textarea path="trnsmitCn" cols="75" rows="2" cssStyle="width:100%" /> - <br /><form:errors path="trnsmitCn" /> - </td> - </tr> - <tr> - <th><spring:message code="cop.sms.recptnTelno" /> <span class="pilsu">*</span></th> - <td class="left"> - 1 : <form:input id="recptnTelno" path="recptnTelno" maxlength="14" cssStyle="width:100px; margin-bottom:2px"/><br> - <c:forEach begin="2" end="5" step="1" var="index"> - <c:out value='${index}'/> : <form:input id="recptnTelno${index-1}" path="recptnTelno" maxlength="14" cssStyle="width:100px; margin-bottom:2px" /><br> - </c:forEach> - <br /><form:errors path="recptnTelno" /> - </td> - </tr> - </table> - - <!-- 하단 버튼 --> - <div class="btn"> - <input class="s_submit" type="submit" value='<spring:message code="cop.sms.send" />' onclick="fn_egov_regist_sms(); return false;" /> - <span class="btn_s"><a href="<c:url value='/cop/sms/selectSmsList.do'/>?pageIndex=<c:out value='${searchVO.pageIndex}'/>" onclick="fn_egov_select_sms(); return false;"><spring:message code="button.list" /></a></span> - </div> - <div style="clear:both;"></div> -</div> - -</form:form> - -</body> -</html>
Add a comment
List