diff --git a/src/main/java/itn/com/cmm/util/DateUtil.java b/src/main/java/itn/com/cmm/util/DateUtil.java index ae7258b1..81899a46 100644 --- a/src/main/java/itn/com/cmm/util/DateUtil.java +++ b/src/main/java/itn/com/cmm/util/DateUtil.java @@ -1,9 +1,12 @@ package itn.com.cmm.util; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.Month; import java.time.format.DateTimeFormatter; +import java.util.Date; /** * @@ -85,4 +88,25 @@ public final class DateUtil { } + + /** + * @methodName : getNowDayToString + * @author : 이호영 + * @date : 2023.08.08 + * @description : yyyy-MM-dd HH:mm:ss.S 형식을 yyyy-MM-dd HH:mm 로 변환 + * @return + * @throws ParseException + */ + public static String getChangFormatS(String str) throws ParseException { + SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S"); // 원본 형식 + Date date = inputFormat.parse(str); // 문자열을 날짜 객체로 변환 + + SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); // 원하는 출력 형식 + String formattedDate = outputFormat.format(date); // 날짜 객체를 원하는 형식의 문자열로 변환 + + return formattedDate; // 출력: 2023-08-07 09:36 + } + + + } diff --git a/src/main/java/itn/let/mjo/apikey/web/ApiKeyMngController.java b/src/main/java/itn/let/mjo/apikey/web/ApiKeyMngController.java index 69a9c647..b2353f07 100644 --- a/src/main/java/itn/let/mjo/apikey/web/ApiKeyMngController.java +++ b/src/main/java/itn/let/mjo/apikey/web/ApiKeyMngController.java @@ -708,7 +708,6 @@ public class ApiKeyMngController { @RequestParam("accessNo") String p_accessNo , Model model) throws Exception { - System.out.println("111111111111"); ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("jsonView"); @@ -716,7 +715,6 @@ public class ApiKeyMngController { try { LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser(); String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); - System.out.println("1111111111112"); ApiKeyVO apiKeyVO = new ApiKeyVO(); apiKeyVO.setAccessNo(p_accessNo); diff --git a/src/main/java/itn/let/uat/uia/web/EgovMypageRESTAPIController.java b/src/main/java/itn/let/uat/uia/web/EgovMypageRESTAPIController.java index 997dcab6..e9868c81 100644 --- a/src/main/java/itn/let/uat/uia/web/EgovMypageRESTAPIController.java +++ b/src/main/java/itn/let/uat/uia/web/EgovMypageRESTAPIController.java @@ -1,5 +1,6 @@ package itn.let.uat.uia.web; +import java.text.ParseException; import java.util.ArrayList; import java.util.List; @@ -14,6 +15,7 @@ import org.springframework.web.servlet.ModelAndView; import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; import itn.com.cmm.LoginVO; +import itn.com.cmm.util.DateUtil; import itn.com.utl.fcc.service.EgovStringUtil; import itn.let.mjo.apikey.service.ApiCallInfoMngService; import itn.let.mjo.apikey.service.ApiKeyMngService; @@ -197,12 +199,26 @@ public class EgovMypageRESTAPIController{ resultList = apiKeyMngService.selectApiKeyApplyStatus(apiKeyVO); System.out.println("============="); if (resultList.size()>0) { + resultList.get(0).setFrstRegistPnttm(DateUtil.getChangFormatS(resultList.get(0).getFrstRegistPnttm())); + resultList.get(0).setLastUpdtPnttm(DateUtil.getChangFormatS(resultList.get(0).getLastUpdtPnttm())); + model.addAttribute("apiVO", resultList.get(0)); + apiKeyVO.setAccessNo(resultList.get(0).getAccessNo()); //api call info 정보 List resultList_call = new ArrayList(); - resultList_call = apiCallInfoMngService.selectMberApiCallInfoList(apiKeyVO); + resultList_call = apiCallInfoMngService.selectMberApiCallInfoList(apiKeyVO); + System.out.println("!!!!!!!!!!!!!!!!!"); + resultList_call.forEach(t-> { + try { + t.setFrstRegistPnttm(DateUtil.getChangFormatS(t.getFrstRegistPnttm())); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + }); + model.addAttribute("apiCallInfoVOList", resultList_call); model.addAttribute("apiCallInfoVOListSize", resultList_call.size()); diff --git a/src/main/webapp/WEB-INF/jsp/uss/ion/apikey/UserAPIKEYList.jsp b/src/main/webapp/WEB-INF/jsp/uss/ion/apikey/UserAPIKEYList.jsp index 187b9187..bb9b9e17 100644 --- a/src/main/webapp/WEB-INF/jsp/uss/ion/apikey/UserAPIKEYList.jsp +++ b/src/main/webapp/WEB-INF/jsp/uss/ion/apikey/UserAPIKEYList.jsp @@ -283,18 +283,21 @@ function fn_reg_user_4_apikey(){ - + 사용중 - + 승인 요청 - + 미승인 - + 미사용 - + + + KEY사용중지 + diff --git a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab1.jsp b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab1.jsp index 76d1708b..b542f7d6 100644 --- a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab1.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab1.jsp @@ -25,7 +25,7 @@ 프로토콜 - HHTP/1.1 + HTTP/1.1 HOST @@ -157,7 +157,7 @@ [data].msgType - 메시지 타입(4 : 단문, 5 : 장문) + 메시지 타입(4 : 단문, 6 : 장문) String diff --git a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab2.jsp b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab2.jsp index d0cff6e1..e8279b65 100644 --- a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab2.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab2.jsp @@ -95,19 +95,19 @@ ... ... ... - ... + X callTo_100 수신자 번호 100 String - O + X smsTxt_100 메시지 내용 100 String(1~2,000Byte) - O + X @@ -168,7 +168,7 @@ [data].msgType - 메시지 타입(4 : 단문, 5 : 장문) + 메시지 타입(4 : 단문, 6 : 장문) String diff --git a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab3.jsp b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab3.jsp index 194c8cb6..f47a3054 100644 --- a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab3.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab3.jsp @@ -180,7 +180,7 @@ [data].msgType - 메시지 타입(4 : 단문, 5 : 장문) + 메시지 타입(4 : 단문, 6 : 장문) String diff --git a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab4.jsp b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab4.jsp index 35353a4d..e69b59de 100644 --- a/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab4.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/api/apiSpec_tab4.jsp @@ -172,7 +172,7 @@ [data].msgType - 메시지 타입(4 : 단문, 5 : 장문) + 메시지 타입(4 : 단문, 6 : 장문) String diff --git a/src/main/webapp/WEB-INF/jsp/web/api/appMgmt.jsp b/src/main/webapp/WEB-INF/jsp/web/api/appMgmt.jsp index 6298b82d..0c360e79 100644 --- a/src/main/webapp/WEB-INF/jsp/web/api/appMgmt.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/api/appMgmt.jsp @@ -152,11 +152,24 @@ function fn_update_apikey(p_accessNo){ function fn_insert_callInfo(p_accessNo){ //frm = document.writeForm; //var p_accessNo = frm.accessNo.value; - + + + + + var callInfo = $("#callInfo").val(); if ($("#callInfo").val()==''){ alert("호출지 정보는 필수입니다."); return false; - } + } + + var ipPattern = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; + + + if (!ipPattern.test(callInfo)) { + alert("IP 형식이 아닙니다. 다시 확인하시고 입력해 주세요"); + return false; + } + $.ajax({ type: "POST", @@ -378,7 +391,7 @@ function fn_reg_user_4_apikey(){ - + @@ -462,7 +475,7 @@ function fn_reg_user_4_apikey(){ -

* IP는 최대 10개까지 등록 가능합니다. 단, IP 대역은 1개의 IP로 계산합니다.

+

* IP는 최대 10개까지 등록 가능합니다.

diff --git a/src/main/webapp/WEB-INF/jsp/web/api/examDown.jsp b/src/main/webapp/WEB-INF/jsp/web/api/examDown.jsp index 2468cd7b..eacaffb9 100644 --- a/src/main/webapp/WEB-INF/jsp/web/api/examDown.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/api/examDown.jsp @@ -19,7 +19,7 @@ $(document).ready(function(){
- + +
아이피(IP) 등록
문자 API를 통해 문자 발송 서버 IP 등록
diff --git a/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp index eb2e256d..eced3b95 100644 --- a/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp @@ -24,8 +24,8 @@ //회원아이디, APIKEY - 보안을 위해 실제 서비스 시에는 이곳에 mberId와 apiKey 값을 적어서 사용해주세요 //실제서비스용 - final String mberId = "antelope"; //문자온 로그인 아이디 - final String apiKey = "5ec0a0311a7a0eb25cc9c11468ce372cd64501"; //발급받은 api key + final String mberId = "dudgusw"; //문자온 로그인 아이디 + final String apiKey = "59d8d714ad68ae2e24e3ae2055334e3e"; //발급받은 api ke //테스트용 //String mberId = request.getParameter("p_mberId"); //문자온 로그인 아이디 @@ -33,7 +33,7 @@ /******************** 전송요청 URL ********************/ - final String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstryDetail"; // 전송요청 URL + final String apiUrl = "http://localhost:8088/api/inqry/hstryDetail"; // 전송요청 URL // String apiUrl = "https://apidev.munjaon.co.kr:9998/api/inqry/hstryDetail"; /**************** 발송가능건수 예제 ******************/ diff --git a/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp index 1f149f1f..8d2cdd0f 100644 --- a/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp @@ -24,8 +24,8 @@ //회원아이디, APIKEY - 보안을 위해 실제 서비스 시에는 이곳에 mberId와 apiKey 값을 적어서 사용해주세요 //실제서비스용 - final String mberId = "antelope"; //문자온 로그인 아이디 - final String apiKey = "5ec0a0311a7a0eb25cc9c11468ce372cd64501"; //발급받은 api key + final String mberId = "dudgusw"; //문자온 로그인 아이디 + final String apiKey = "59d8d714ad68ae2e24e3ae2055334e3e"; //발급받은 api ke //테스트용 //String mberId = request.getParameter("p_mberId"); //문자온 로그인 아이디 @@ -33,7 +33,7 @@ /******************** 전송요청 URL ********************/ - final String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstry"; + final String apiUrl = "http://localhost:8088/api/inqry/hstry"; /**************** 발송가능건수 예제 ******************/ System.out.println("전체발송이력"); diff --git a/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp index ade30f6e..ee7bcdd1 100644 --- a/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp @@ -25,7 +25,7 @@ //회원아이디, APIKEY - 보안을 위해 실제 서비스 시에는 이곳에 mberId와 apiKey 값을 적어서 사용해주세요 //실제서비스용 final String mberId = "antelope"; //문자온 로그인 아이디 - final String apiKey = "5ec0a0311a7a0eb25cc9c11468ce372cd64501"; //발급받은 api key + final String apiKey = "59d8d714ad68ae2e24e3ae2055334e3e"; //발급받은 api key //테스트용