diff --git a/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java b/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java index b4bba6e..82c5c7f 100644 --- a/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java +++ b/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java @@ -116,8 +116,12 @@ public class ApiAdapterController implements HttpAdapterServiceKey { if (httpStatus == 200) { // 업체별 aync response message 가 다르다. String asyncMsgStyle = httpProp.getProperty("ASYNC_RTNMSG_TYPE", "").toUpperCase(); - //String responseBody = makeResponseBodyMsg(asyncMsgStyle); - String responseBody = asyncMsgStyle; + String responseBody =""; + if (asyncMsgStyle == null || asyncMsgStyle.trim().isEmpty()) { + responseBody = makeResponseBodyMsg(); + } else { + responseBody = asyncMsgStyle; + } responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseBody); // jwhong } else { @@ -221,6 +225,23 @@ public class ApiAdapterController implements HttpAdapterServiceKey { InboundErrorLogger.error(errorInfoVO); } + + private String makeResponseBodyMsg() { + + Map dataMap = new HashMap<>(); + dataMap.put("result", 1); + Map map = new HashMap<>(); + + map.put("code", "200"); + map.put("data", dataMap); + map.put("message", "정상 처리 되었습니다."); + + JSONObject json = new JSONObject(); + json.putAll(map); + + return json.toJSONString(); + } + /* private String makeResponseBodyMsg(String asyncMsgStyle) {