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
@@ -158,10 +158,16 @@ public class ObpGwMetricManService extends BaseService {
.filter(Objects::nonNull)
.collect(Collectors.toSet());
// URI 조회용 EAI 서비스 일련번호 (HTTP_ADAPTER_EXTRA_LOG.GUID와 매핑)
Set<String> eaiSvcSernos = aggregatedList.stream()
.map(ObpGwMetricVO::getEaiSvcSerno)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
Map<String, String> apiNameMap = obpGwMetricDAO.selectApiNames(apigwDataSourceType.getSchema(), apiIds);
Map<String, String> uriMap = obpGwMetricDAO.selectUris(apigwDataSourceType.getSchema(), apiIds);
log.info("[3단계] 부가정보 조회 완료: apiCount={}, elapsed={}ms",
apiIds.size(), System.currentTimeMillis() - step3Start);
Map<String, String> uriMap = obpGwMetricDAO.selectUris(apigwDataSourceType.getSchema(), eaiSvcSernos);
log.info("[3단계] 부가정보 조회 완료: apiCount={}, eaiSvcSernoCount={}, elapsed={}ms",
apiIds.size(), eaiSvcSernos.size(), System.currentTimeMillis() - step3Start);
// ═══════════════════════════════════════════════════════════════════
// 4단계: 지표 DB로 전환 후 appId 조회 및 UPSERT
@@ -196,7 +202,7 @@ public class ObpGwMetricManService extends BaseService {
entity.setAttemptedCount(vo.getAttemptedCount());
entity.setCompletedCount(vo.getCompletedCount());
entity.setApiName(apiNameMap.get(vo.getApiId()));
entity.setUri(uriMap.get(vo.getApiId()));
entity.setUri(uriMap.get(vo.getEaiSvcSerno())); // eaiSvcSerno로 URI 조회
entity.setAppId(appIdMap.get(vo.getOrgId()));
entity.setUpdateCount(entity.getUpdateCount() + 1); // 보정 횟수 증가
entity.setUpdatedAt(LocalDateTime.now());
@@ -253,7 +259,7 @@ public class ObpGwMetricManService extends BaseService {
entity.setAttemptedCount(vo.getAttemptedCount());
entity.setCompletedCount(vo.getCompletedCount());
entity.setApiName(apiNameMap.get(vo.getApiId()));
entity.setUri(uriMap.get(vo.getApiId()));
entity.setUri(uriMap.get(vo.getEaiSvcSerno())); // eaiSvcSerno로 URI 조회
entity.setAppId(appIdMap.get(vo.getOrgId()));
entity.setUpdateCount(0);
entity.setCreatedAt(LocalDateTime.now());