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")
|
@SuppressWarnings("unchecked")
|
||||||
public Map<String, String> selectUris(String schemaId, Set<String> apiIds) {
|
public Map<String, String> selectUris(String schemaId, Set<String> eaiSvcSernos) {
|
||||||
if (apiIds == null || apiIds.isEmpty()) {
|
if (eaiSvcSernos == null || eaiSvcSernos.isEmpty()) {
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
paramMap.put("schemaId", schemaId);
|
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);
|
List<Map<String, String>> resultList = this.template.queryForList("ObpGwMetric.selectUris", paramMap);
|
||||||
|
|
||||||
Map<String, String> result = new HashMap<>();
|
Map<String, String> result = new HashMap<>();
|
||||||
for (Map<String, String> m : resultList) {
|
for (Map<String, String> m : resultList) {
|
||||||
String apiId = m.get("API_ID");
|
String eaiSvcSerno = m.get("EAI_SVC_SERNO");
|
||||||
String uri = m.get("URI");
|
String uri = m.get("URI");
|
||||||
if (apiId != null && uri != null) {
|
if (eaiSvcSerno != null && uri != null) {
|
||||||
result.put(apiId, uri);
|
result.put(eaiSvcSerno, uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ public class ObpGwMetricVO {
|
|||||||
/** 완료 횟수 (LOGPRCSSSERNO='400' AND 성공 조건 건수) */
|
/** 완료 횟수 (LOGPRCSSSERNO='400' AND 성공 조건 건수) */
|
||||||
private Long completedCount;
|
private Long completedCount;
|
||||||
|
|
||||||
|
/** EAI 서비스 일련번호 (URI 조회용 - HTTP_ADAPTER_EXTRA_LOG.GUID와 매핑) */
|
||||||
|
private String eaiSvcSerno;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* timeslice 문자열을 LocalDateTime으로 변환
|
* timeslice 문자열을 LocalDateTime으로 변환
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -158,10 +158,16 @@ public class ObpGwMetricManService extends BaseService {
|
|||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.collect(Collectors.toSet());
|
.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> apiNameMap = obpGwMetricDAO.selectApiNames(apigwDataSourceType.getSchema(), apiIds);
|
||||||
Map<String, String> uriMap = obpGwMetricDAO.selectUris(apigwDataSourceType.getSchema(), apiIds);
|
Map<String, String> uriMap = obpGwMetricDAO.selectUris(apigwDataSourceType.getSchema(), eaiSvcSernos);
|
||||||
log.info("[3단계] 부가정보 조회 완료: apiCount={}, elapsed={}ms",
|
log.info("[3단계] 부가정보 조회 완료: apiCount={}, eaiSvcSernoCount={}, elapsed={}ms",
|
||||||
apiIds.size(), System.currentTimeMillis() - step3Start);
|
apiIds.size(), eaiSvcSernos.size(), System.currentTimeMillis() - step3Start);
|
||||||
|
|
||||||
// ═══════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════
|
||||||
// 4단계: 지표 DB로 전환 후 appId 조회 및 UPSERT
|
// 4단계: 지표 DB로 전환 후 appId 조회 및 UPSERT
|
||||||
@@ -196,7 +202,7 @@ public class ObpGwMetricManService extends BaseService {
|
|||||||
entity.setAttemptedCount(vo.getAttemptedCount());
|
entity.setAttemptedCount(vo.getAttemptedCount());
|
||||||
entity.setCompletedCount(vo.getCompletedCount());
|
entity.setCompletedCount(vo.getCompletedCount());
|
||||||
entity.setApiName(apiNameMap.get(vo.getApiId()));
|
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.setAppId(appIdMap.get(vo.getOrgId()));
|
||||||
entity.setUpdateCount(entity.getUpdateCount() + 1); // 보정 횟수 증가
|
entity.setUpdateCount(entity.getUpdateCount() + 1); // 보정 횟수 증가
|
||||||
entity.setUpdatedAt(LocalDateTime.now());
|
entity.setUpdatedAt(LocalDateTime.now());
|
||||||
@@ -253,7 +259,7 @@ public class ObpGwMetricManService extends BaseService {
|
|||||||
entity.setAttemptedCount(vo.getAttemptedCount());
|
entity.setAttemptedCount(vo.getAttemptedCount());
|
||||||
entity.setCompletedCount(vo.getCompletedCount());
|
entity.setCompletedCount(vo.getCompletedCount());
|
||||||
entity.setApiName(apiNameMap.get(vo.getApiId()));
|
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.setAppId(appIdMap.get(vo.getOrgId()));
|
||||||
entity.setUpdateCount(0);
|
entity.setUpdateCount(0);
|
||||||
entity.setCreatedAt(LocalDateTime.now());
|
entity.setCreatedAt(LocalDateTime.now());
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
<result property="timeslice" column="TIMESLICE"/>
|
<result property="timeslice" column="TIMESLICE"/>
|
||||||
<result property="attemptedCount" column="ATTEMPTED_COUNT"/>
|
<result property="attemptedCount" column="ATTEMPTED_COUNT"/>
|
||||||
<result property="completedCount" column="COMPLETED_COUNT"/>
|
<result property="completedCount" column="COMPLETED_COUNT"/>
|
||||||
|
<result property="eaiSvcSerno" column="EAI_SVC_SERNO"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@@ -42,7 +43,8 @@
|
|||||||
SUM(CASE WHEN LOGPRCSSSERNO = '100' THEN 1 ELSE 0 END) AS ATTEMPTED_COUNT,
|
SUM(CASE WHEN LOGPRCSSSERNO = '100' THEN 1 ELSE 0 END) AS ATTEMPTED_COUNT,
|
||||||
SUM(CASE WHEN LOGPRCSSSERNO = '400'
|
SUM(CASE WHEN LOGPRCSSSERNO = '400'
|
||||||
AND (RSPNSERRCDNAME IS NULL OR RSPNSERRCDNAME LIKE 'ESB%')
|
AND (RSPNSERRCDNAME IS NULL OR RSPNSERRCDNAME LIKE 'ESB%')
|
||||||
THEN 1 ELSE 0 END) AS COMPLETED_COUNT
|
THEN 1 ELSE 0 END) AS COMPLETED_COUNT,
|
||||||
|
MAX(EAISVCSERNO) AS EAI_SVC_SERNO
|
||||||
FROM $schemaId$.$tableName$
|
FROM $schemaId$.$tableName$
|
||||||
WHERE EAIBZWKDSTCD = #bzwkCode#
|
WHERE EAIBZWKDSTCD = #bzwkCode#
|
||||||
AND MSGDPSTYMS BETWEEN #startTime# AND #endTime#
|
AND MSGDPSTYMS BETWEEN #startTime# AND #endTime#
|
||||||
@@ -63,15 +65,21 @@
|
|||||||
</iterate>
|
</iterate>
|
||||||
</statement>
|
</statement>
|
||||||
|
|
||||||
<!-- URI 조회 (TSEAIHS04) - APIFULLPATH 사용 -->
|
<!--
|
||||||
|
URI 조회 (HTTP_ADAPTER_EXTRA_LOG)
|
||||||
|
- GUID = TSEAILG1X.EAISVCSERNO
|
||||||
|
- SERVICE_PROCESS_NUMBER = 100 (인바운드 요청)
|
||||||
|
- 결과: HTTP_METHOD + ' ' + URL (예: POST /mapi/kjbank/obp/kakaobank/v3/loan/query)
|
||||||
|
-->
|
||||||
<statement id="selectUris" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
|
<statement id="selectUris" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
|
||||||
SELECT
|
SELECT
|
||||||
EAISVCNAME AS API_ID,
|
GUID AS EAI_SVC_SERNO,
|
||||||
APIFULLPATH AS URI
|
HTTP_METHOD || ' ' || URL AS URI
|
||||||
FROM $schemaId$.TSEAIHS04
|
FROM $schemaId$.HTTP_ADAPTER_EXTRA_LOG
|
||||||
WHERE EAISVCNAME IN
|
WHERE SERVICE_PROCESS_NUMBER = 100
|
||||||
<iterate property="apiIds" open="(" close=")" conjunction=",">
|
AND GUID IN
|
||||||
#apiIds[]#
|
<iterate property="eaiSvcSernos" open="(" close=")" conjunction=",">
|
||||||
|
#eaiSvcSernos[]#
|
||||||
</iterate>
|
</iterate>
|
||||||
</statement>
|
</statement>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user