GwMetric 테이블 변경

This commit is contained in:
Rinjae
2025-12-17 17:02:53 +09:00
parent 64aeedde2e
commit c4fbd276b9
9 changed files with 172 additions and 63 deletions
@@ -61,18 +61,39 @@ public class ObpGwMetricDAO extends SqlMapClientTemplateDao {
}
/**
* URI 조회 (HTTP_ADAPTER_EXTRA_LOG)
* URI 및 HTTP Method 조회 결과
*/
public static class UriMethodResult {
private final Map<String, String> uriMap;
private final Map<String, String> methodMap;
public UriMethodResult(Map<String, String> uriMap, Map<String, String> methodMap) {
this.uriMap = uriMap;
this.methodMap = methodMap;
}
public Map<String, String> getUriMap() {
return uriMap;
}
public Map<String, String> getMethodMap() {
return methodMap;
}
}
/**
* URI 및 HTTP Method 조회 (HTTP_ADAPTER_EXTRA_LOG)
* - GUID = TSEAILG1X.EAISVCSERNO와 매핑
* - SERVICE_PROCESS_NUMBER = 100 (인바운드 요청)
*
* @param schemaId DB 스키마 ID
* @param eaiSvcSernos EAI 서비스 일련번호 목록 (GUID)
* @return eaiSvcSerno → URI 맵 (예: "POST /api/v1/transfer")
* @return UriMethodResult (eaiSvcSerno → URI 맵, eaiSvcSerno → METHOD 맵)
*/
@SuppressWarnings("unchecked")
public Map<String, String> selectUris(String schemaId, Set<String> eaiSvcSernos) {
public UriMethodResult selectUrisAndMethods(String schemaId, Set<String> eaiSvcSernos) {
if (eaiSvcSernos == null || eaiSvcSernos.isEmpty()) {
return new HashMap<>();
return new UriMethodResult(new HashMap<>(), new HashMap<>());
}
HashMap<String, Object> paramMap = new HashMap<>();
@@ -81,15 +102,22 @@ public class ObpGwMetricDAO extends SqlMapClientTemplateDao {
List<Map<String, String>> resultList = this.template.queryForList("ObpGwMetric.selectUris", paramMap);
Map<String, String> result = new HashMap<>();
Map<String, String> uriMap = new HashMap<>();
Map<String, String> methodMap = new HashMap<>();
for (Map<String, String> m : resultList) {
String eaiSvcSerno = m.get("EAI_SVC_SERNO");
String uri = m.get("URI");
if (eaiSvcSerno != null && uri != null) {
result.put(eaiSvcSerno, uri);
String method = m.get("METHOD");
if (eaiSvcSerno != null) {
if (uri != null) {
uriMap.put(eaiSvcSerno, uri);
}
if (method != null) {
methodMap.put(eaiSvcSerno, method);
}
}
}
return result;
return new UriMethodResult(uriMap, methodMap);
}
/**