OBP 수수료 연동시 에러 메세지 개선
This commit is contained in:
+14
@@ -64,6 +64,10 @@ public class CommissionController {
|
||||
String obmUrl = portalPropertyService.getPortalPropertiesAsMap("Portal").getOrDefault("obp.obm.url", "");
|
||||
String url = obmUrl + Constants.COMMISSION_PRINT_URL;
|
||||
String result = externalService.getResponseHttpPost(url, toJson(search));
|
||||
if (StringUtils.isEmpty(result)) {
|
||||
model.addAttribute("error", "외부 서버 연결에 실패하였습니다.");
|
||||
return "apps/commission/commissionPrint";
|
||||
}
|
||||
HashMap<String, Object> returnObj = new ObjectMapper().readValue(result, HashMap.class);
|
||||
|
||||
if (!StringUtils.isEmpty(returnObj.get("error"))) {
|
||||
@@ -76,6 +80,10 @@ public class CommissionController {
|
||||
log.debug("Found Together : " + search.getPartnerCode());
|
||||
search.setPartnerCode("000002-02");
|
||||
String togetherResult = externalService.getResponseHttpPost(url, toJson(search));
|
||||
if (StringUtils.isEmpty(togetherResult)) {
|
||||
model.addAttribute("error", "외부 서버 연결에 실패하였습니다.");
|
||||
return "apps/commission/commissionPrint";
|
||||
}
|
||||
|
||||
HashMap togetherLendingReturnObj = new ObjectMapper().readValue(togetherResult, HashMap.class);
|
||||
log.debug("togetherLendingReturnObj : " + togetherLendingReturnObj.toString());
|
||||
@@ -118,6 +126,9 @@ public class CommissionController {
|
||||
String obmUrl = portalPropertyService.getPortalPropertiesAsMap("Portal").getOrDefault("obp.obm.url", "");
|
||||
String url = obmUrl + Constants.COMMISSION_URL;
|
||||
String result = externalService.getResponseHttpPost(url, toJson(search));
|
||||
if (StringUtils.isEmpty(result)) {
|
||||
return ErrorUtil.create("fail.commission.serverError", "외부 서버 연결에 실패하였습니다.");
|
||||
}
|
||||
HashMap<String, Object> returnObj = new ObjectMapper().readValue(result, HashMap.class);
|
||||
if (!StringUtils.isEmpty(returnObj.get("error"))) {
|
||||
HashMap<String, Object> error = (HashMap) returnObj.get("error");
|
||||
@@ -128,6 +139,9 @@ public class CommissionController {
|
||||
log.debug("Found Together : " + search.getPartnerCode());
|
||||
search.setPartnerCode("000002-02");
|
||||
String togetherResult = externalService.getResponseHttpPost(url, toJson(search));
|
||||
if (StringUtils.isEmpty(togetherResult)) {
|
||||
return ErrorUtil.create("fail.commission.serverError", "외부 서버 연결에 실패하였습니다.");
|
||||
}
|
||||
|
||||
HashMap<String, Object> togetherLendingReturnObj = new ObjectMapper().readValue(togetherResult, HashMap.class);
|
||||
log.debug("togetherLendingReturnObj : " + togetherLendingReturnObj.toString());
|
||||
|
||||
Reference in New Issue
Block a user