diff --git a/src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java b/src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java index 834f60b4..d24b3eaf 100644 --- a/src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java +++ b/src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java @@ -208,7 +208,6 @@ public class MjonMsgDataController { HttpServletRequest request, ModelMap model, RedirectAttributes redirectAttributes) throws Exception{ - try { /* @@ -287,9 +286,12 @@ public class MjonMsgDataController { letterVO.setLastIndex(paginationInfo.getLastRecordIndex()); letterVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); - + List resultPhoList = mjonMsgDataService.selectPhotoLetterList(letterVO); - + + + + model.addAttribute("resultPhoList", resultPhoList); paginationInfo.setTotalRecordCount( resultPhoList.size()> 0 ? ((Long)((EgovMap)resultPhoList.get(0)).get("totCnt")).intValue() : 0); model.addAttribute("paginationInfo", paginationInfo); @@ -442,6 +444,9 @@ public class MjonMsgDataController { @RequestMapping(value= {"/web/mjon/msgdata/selectMsgDataSMLViewAjax.do"}) public String selectMsgDataSMLView(@ModelAttribute("searchVO") MjonMsgDataVO searchVO, CateCode cateCode, ModelMap model) throws Exception{ + + System.out.println(" : selectMsgDataSMLView : "); + long startTime = System.nanoTime(); // 시작 시간 //로그인 권한정보 불러오기 LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); @@ -662,23 +667,25 @@ public class MjonMsgDataController { //최근 전송 내역 // 20241230 이호영 // 로딩 시간이 오래걸려 ajax로 따로 분리함 -// Calendar cal = Calendar.getInstance(); -// Date now = new Date(); + /* + Calendar cal = Calendar.getInstance(); + Date now = new Date(); -// SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); + SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); -// cal.setTime(now); -// cal.add(Calendar.DATE, -3); + cal.setTime(now); + cal.add(Calendar.DATE, -3); -// String chkDate = format.format(cal.getTime()); -// searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작 -// List resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO); -// model.addAttribute("resultLatestMsgList", resultLatestMsgList); + String chkDate = format.format(cal.getTime()); + searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작 + List resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO); + model.addAttribute("resultLatestMsgList", resultLatestMsgList); + + */ //자주보내는 번호 - List resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(searchVO); - model.addAttribute("resultBookMarkMsgList", resultBookMarkMsgList); - +// List resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(searchVO); +// model.addAttribute("resultBookMarkMsgList", resultBookMarkMsgList); /** pageing */ PaginationInfo paginationInfo = new PaginationInfo(); @@ -698,12 +705,18 @@ public class MjonMsgDataController { model.addAttribute("tabDision", searchVO.getTabDision()); - + + long endTime = System.nanoTime(); // 종료 시간 + // 실행 시간 계산 (나노초 단위) + long duration = endTime - startTime; + + System.out.println("Execution time: " + duration + " nanoseconds"); + System.out.println("Execution time: " + (duration / 1_000_000) + " milliseconds"); return "web/msgdata/MsgDataSMLView"; } @RequestMapping(value= {"/web/mjon/msgdata/resultLatestMsgListAjax.do"}) - public ResponseEntity cancelRegistIdChkAjax() throws Exception { + public ResponseEntity resultLatestMsgListAjax() throws Exception { LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); @@ -732,6 +745,25 @@ public class MjonMsgDataController { return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", resultLatestMsgList)); } + @RequestMapping(value= {"/web/mjon/msgdata/resultBookMarkMsgList.do"}) + public ResponseEntity resultBookMarkMsgList() throws Exception { + + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); + + if(StringUtils.isEmpty(userId)) { + + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", "")); + } + + MjonMsgDataVO mjonMsgDataVO = new MjonMsgDataVO(); + mjonMsgDataVO.setUserId(userId); + + List resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(mjonMsgDataVO); + + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", resultBookMarkMsgList)); + } + /** * 문자재전송 내용 처리 diff --git a/src/main/resources/egovframework/egovProps/globals_dev.properties b/src/main/resources/egovframework/egovProps/globals_dev.properties index 961086a7..39cc1fb6 100644 --- a/src/main/resources/egovframework/egovProps/globals_dev.properties +++ b/src/main/resources/egovframework/egovProps/globals_dev.properties @@ -28,17 +28,15 @@ Globals.Env = dev # mysql Globals.DriverClassName=com.mysql.jdbc.Driver -Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon -Globals.UserName= mjonUr -#Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon_20230221 -#Globals.UserName= mjonUr_20230221 -Globals.Password= mjon!@#$ +#Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon +#Globals.UserName= mjonUr +#Globals.Password= mjon!@#$ # mysql-prod #Globals.DriverClassName=com.mysql.jdbc.Driver -#Globals.Url=jdbc:mysql://139.150.72.157:3306/mjon -#Globals.UserName= mjonUr -#Globals.Password= mjon!@#$ +Globals.Url=jdbc:mysql://139.150.72.157:3306/mjon +Globals.UserName= mjonUr +Globals.Password= mjon!@#$ # MainPage Setting(admin) Globals.MainPage = /cmm/main/mainPage.do diff --git a/src/main/resources/egovframework/egovProps/globals_local.properties b/src/main/resources/egovframework/egovProps/globals_local.properties index ed897f46..c1fe48cb 100644 --- a/src/main/resources/egovframework/egovProps/globals_local.properties +++ b/src/main/resources/egovframework/egovProps/globals_local.properties @@ -123,8 +123,3 @@ Globals.pay.kgm.mobile.payMode=00 #Slack Globals.slack.hooks.url=https://hooks.slack.com/services/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 Globals.slack.channel.name=\ud14c\uc2a4\ud2b8_mjon\uba54\uc2dc\uc9c0 - - - - - diff --git a/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml b/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml index 486e155c..1ce05fbd 100644 --- a/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml @@ -2204,7 +2204,7 @@ ' + - '' + - '

' + item.callTo + '

' + - '' + ''; @@ -244,7 +245,6 @@ function resultLatestMsgList(){ // 데이터가 없는 경우 $latestMsgUl.append('
  • 최근 발송 내역이 없습니다.

  • '); } - // console.log('$latestMsgUl : ', $latestMsgUl.html()); }, error:function(request , status, error){ console.log(' error ?'); @@ -254,6 +254,57 @@ function resultLatestMsgList(){ }); } +// 자주보내는 번호 +function resultBookMarkMsgList(){ + + $.ajax({ + type:"POST", + url:"/web/mjon/msgdata/resultBookMarkMsgList.do", + data:{}, + dataType:'json', + // timeout:(1000*30), + success:function(data){ + + console.log('resultBookMarkMsgList data : ', data); + + // 가져온 데이터 배열 + let resultList = data.object; + let $bookMsgUl = $('#bookMsgUl'); // 기존 리스트 UL + console.log('let $bookMsgUl : ', $bookMsgUl); + + // 기존 내용을 비우기 + $bookMsgUl.empty(); + + // 데이터가 있는 경우 + if (resultList && resultList.length > 0) { + resultList.forEach(function(item, index) { + console.log(item.addrPhoneNo + " : " + item.addrPhoneNo); + let listItem = + '
  • ' + + '' + + '' + + '

    ' + item.addrPhoneNo + '

    ' + + '' + + '
  • '; + + $bookMsgUl.append(listItem); + }); + } else { + // 데이터가 없는 경우 + $bookMsgUl.append('
  • 등록된 자주 보내는 번호 내역이 없습니다..

  • '); + } + }, + error:function(request , status, error){ + console.log(' error ?'); + console.log('request : ', request); + console.log('status : ', status); + } + }); +} + + /* * 버튼 disabled 스크립트 */ @@ -3566,7 +3617,7 @@ function getMjMsgSentListAll(pageNo) {
      - + <%--
    • @@ -3582,7 +3633,7 @@ function getMjMsgSentListAll(pageNo) {

      등록된 자주 보내는 번호 내역이 없습니다.

    • -
      +
      --%>