diff --git a/src/main/java/com/itn/mjonApi/cmn/msg/StatMsg.java b/src/main/java/com/itn/mjonApi/cmn/msg/StatMsg.java index b8ac343..124dd50 100644 --- a/src/main/java/com/itn/mjonApi/cmn/msg/StatMsg.java +++ b/src/main/java/com/itn/mjonApi/cmn/msg/StatMsg.java @@ -43,6 +43,12 @@ public enum StatMsg { , STAT_1090("1090","요청 발송일시에 발송 불가") // 아직 사용 안함 , STAT_1099("1099","기타 시스템 오류") + //전체발송====================================================================== + , STAT_3099("3099","기타 시스템 오류") + + //상세발송====================================================================== + , STAT_4099("4099","기타 시스템 오류") + //====================================================================== , msgType4("단문","SMS") , msgType6("장문","LMS") diff --git a/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/HstryService.java b/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/HstryService.java index fa061c4..dc54ee2 100644 --- a/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/HstryService.java +++ b/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/HstryService.java @@ -1,5 +1,6 @@ package com.itn.mjonApi.mjon.api.inqry.service; +import com.itn.mjonApi.cmn.msg.RestResponse; import com.itn.mjonApi.mjon.api.inqry.service.mapper.domain.HstryDetailVO; import com.itn.mjonApi.mjon.api.inqry.service.mapper.domain.HstryResponseVO; import com.itn.mjonApi.mjon.api.inqry.service.mapper.domain.HstryVO; @@ -9,7 +10,7 @@ public interface HstryService { //HstryResponseVO hstryListOld(MsgRequestVO msgRequestVO) throws Exception; - HstryResponseVO hstryList(HstryVO hstryVO) throws Exception; - - HstryResponseVO hstryDetailList(HstryDetailVO HstryDetailVO) throws Exception; + RestResponse hstryList(HstryVO hstryVO) throws Exception; + + RestResponse hstryDetailList(HstryDetailVO HstryDetailVO) throws Exception; } diff --git a/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/impl/HstryServiceImpl.java b/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/impl/HstryServiceImpl.java index 79a4052..fd4b9e9 100644 --- a/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/impl/HstryServiceImpl.java +++ b/src/main/java/com/itn/mjonApi/mjon/api/inqry/service/impl/HstryServiceImpl.java @@ -7,6 +7,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.itn.mjonApi.cmn.apiServer.ApiService; +import com.itn.mjonApi.cmn.msg.RestResponse; +import com.itn.mjonApi.cmn.msg.SendSuccessRestResponse; import com.itn.mjonApi.mjon.api.access.mapper.domain.AccessKeyVO; import com.itn.mjonApi.mjon.api.inqry.mapper.HstryMapper; import com.itn.mjonApi.mjon.api.inqry.service.HstryService; @@ -37,8 +39,9 @@ public class HstryServiceImpl implements HstryService { private static final String replaseStrList = "[*이름*],[*1*],[*2*],[*3*],[*4*]"; + @Override - public HstryResponseVO hstryList(HstryVO hstryVO) throws Exception { + public RestResponse hstryList(HstryVO hstryVO) throws Exception { //전체 발송 이력 log.info(" :: hstryList ::"); @@ -84,15 +87,15 @@ public class HstryServiceImpl implements HstryService { } catch (Exception e) { log.info("selectPrice Error [{}]", e.getMessage()); - } - - return hstryResponseVO; - + return new RestResponse("STAT_3090"); + } + + return new RestResponse(hstryResponseVO); } - + @Override - public HstryResponseVO hstryDetailList(HstryDetailVO hstryDetailVO) throws Exception { + public RestResponse hstryDetailList(HstryDetailVO hstryDetailVO) throws Exception { //전체 발송 이력 log.info(" :: hstryList ::"); @@ -113,9 +116,10 @@ public class HstryServiceImpl implements HstryService { } catch (Exception e) { log.info("selectPrice Error [{}]", e.getMessage()); + return new RestResponse("STAT_4090"); } - return hstryResponseVO; + return new RestResponse(hstryResponseVO); } diff --git a/src/main/java/com/itn/mjonApi/mjon/api/inqry/web/HstryRestController.java b/src/main/java/com/itn/mjonApi/mjon/api/inqry/web/HstryRestController.java index bebfa24..f3829b9 100644 --- a/src/main/java/com/itn/mjonApi/mjon/api/inqry/web/HstryRestController.java +++ b/src/main/java/com/itn/mjonApi/mjon/api/inqry/web/HstryRestController.java @@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; +import com.itn.mjonApi.cmn.msg.RestResponse; import com.itn.mjonApi.mjon.api.inqry.service.HstryService; import com.itn.mjonApi.mjon.api.inqry.service.mapper.domain.HstryDetailVO; import com.itn.mjonApi.mjon.api.inqry.service.mapper.domain.HstryResponseVO; @@ -51,27 +52,29 @@ public class HstryRestController { @CrossOrigin("*") // 모든 요청에 접근 허용 @PostMapping("/api/inqry/hstry") @ApiOperation(value= "전송 내역 조회", notes = "전체 전송 내역 조회") - public ResponseEntity apiInqryHstry(HstryVO hstryVO) throws Exception { + public ResponseEntity apiInqryHstry(HstryVO hstryVO) throws Exception { - return ResponseEntity.ok(hstryService.hstryList(hstryVO)); + return ResponseEntity.ok().body(hstryService.hstryList(hstryVO)); + + //return ResponseEntity.ok(hstryService.hstryList(hstryVO)); //return sendService.sendMsgData(msgRequestVO); } - + /** * * @param msgRequestVO * @Discription 문자 발송 테스트 * @return - */ + */ @CrossOrigin("*") // 모든 요청에 접근 허용 @PostMapping("/api/inqry/hstryDetail") @ApiOperation(value= "전송 내역 조회(상세)", notes = "상세 전송 내역 조회") - public ResponseEntity apiInqryHstryDetail(HstryDetailVO hstryDetailVO) throws Exception { + public ResponseEntity apiInqryHstryDetail(HstryDetailVO hstryDetailVO) throws Exception { - return ResponseEntity.ok(hstryService.hstryDetailList(hstryDetailVO)); - + return ResponseEntity.ok().body(hstryService.hstryDetailList(hstryDetailVO)); + //return sendService.sendMsgData(msgRequestVO); }