From 768468dd3a698e9f1c6d449d6a3d684329a7c7f5 Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Thu, 28 Nov 2024 10:53:19 +0900 Subject: [PATCH] +test ajax --- .../itn/let/mjo/test/web/TestController.java | 20 +++++++++++++++++++ .../WEB-INF/jsp/web/msgdata/MsgDataView.jsp | 7 +++++++ 2 files changed, 27 insertions(+) diff --git a/src/main/java/itn/let/mjo/test/web/TestController.java b/src/main/java/itn/let/mjo/test/web/TestController.java index 980afc2a..b88514cd 100644 --- a/src/main/java/itn/let/mjo/test/web/TestController.java +++ b/src/main/java/itn/let/mjo/test/web/TestController.java @@ -47,6 +47,7 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.client.RestTemplate; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; @@ -3380,5 +3381,24 @@ public class TestController { } } + + @RequestMapping(value = "/web/mjon/test/ajaxTest.do") + public ResponseEntity ajaxTest( + @RequestParam String isSuccess, + @RequestParam String s_msg, + @RequestParam String f_msg, + HttpServletRequest request, + ModelMap model) throws Exception { + + if("Y".equals(isSuccess)) { + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, s_msg, "")); + + }else { + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, f_msg, "")); + + } + + } + } diff --git a/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp b/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp index 09932ea8..133ff7df 100644 --- a/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp @@ -1043,6 +1043,9 @@ function blineSendCheck(blineCode) { return confCheck; } + + + //문자발송 처리 함수 function fn_sendMsgData(){ @@ -1233,6 +1236,10 @@ function fn_sendMsgData(){ } + + + + function sendMsgAjax_advc(){ // 타블레이터 호출 var $selectedData = tableL.getData(); // 데이터 가져오기