OBP GW 집계시 API URI 참조 테이블 변경

This commit is contained in:
Rinjae
2025-12-15 16:26:32 +09:00
parent bc8807f0b5
commit 6d53f24bcd
4 changed files with 43 additions and 20 deletions
@@ -61,26 +61,32 @@ public class ObpGwMetricDAO extends SqlMapClientTemplateDao {
}
/**
* URI 조회 (TSEAIHS04)
* URI 조회 (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")
*/
@SuppressWarnings("unchecked")
public Map<String, String> selectUris(String schemaId, Set<String> apiIds) {
if (apiIds == null || apiIds.isEmpty()) {
public Map<String, String> selectUris(String schemaId, Set<String> eaiSvcSernos) {
if (eaiSvcSernos == null || eaiSvcSernos.isEmpty()) {
return new HashMap<>();
}
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("schemaId", schemaId);
paramMap.put("apiIds", new ArrayList<>(apiIds)); // Set → List 변환 (iBATIS iterate 호환)
paramMap.put("eaiSvcSernos", new ArrayList<>(eaiSvcSernos)); // Set → List 변환 (iBATIS iterate 호환)
List<Map<String, String>> resultList = this.template.queryForList("ObpGwMetric.selectUris", paramMap);
Map<String, String> result = new HashMap<>();
for (Map<String, String> m : resultList) {
String apiId = m.get("API_ID");
String eaiSvcSerno = m.get("EAI_SVC_SERNO");
String uri = m.get("URI");
if (apiId != null && uri != null) {
result.put(apiId, uri);
if (eaiSvcSerno != null && uri != null) {
result.put(eaiSvcSerno, uri);
}
}
return result;
@@ -38,6 +38,9 @@ public class ObpGwMetricVO {
/** 완료 횟수 (LOGPRCSSSERNO='400' AND 성공 조건 건수) */
private Long completedCount;
/** EAI 서비스 일련번호 (URI 조회용 - HTTP_ADAPTER_EXTRA_LOG.GUID와 매핑) */
private String eaiSvcSerno;
/**
* timeslice 문자열을 LocalDateTime으로 변환
*/