Merge remote-tracking branch 'origin/jenkins_with_weblogic' of C:/KJB_DEV/eapim-bundle/bundles/251215-1/eapim-admin_incremental_2025-11-15.bundle into jenkins_with_weblogic
This commit is contained in:
@@ -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으로 변환
|
||||
*/
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user