async defalt 메시지 추가
This commit is contained in:
@@ -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<String, Object> dataMap = new HashMap<>();
|
||||
dataMap.put("result", 1);
|
||||
Map<String, Object> 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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user