다양화 Wave2: dbio 289 + common 120 고유화 + 프로그램 206개 EXEC SQL 심화
- dbio io(289): fetch/touch/total 시그니처 유지, SQL 바디를 JOIN/집계/커서/ upsert/DELETE 등 구조로 고유화 → 289/289 고유 - common cu(120): 유틸 시그니처 유지, Luhn/CRC/Zeller/BIN레인지/amortization/ netting 등 실 알고리즘으로 고유화 → 120/120 고유 - 심화: 실제 EXEC SQL 없던 프로그램에 SELECT/INSERT/UPDATE/커서+tx 추가 → online+batch 530/530 전부 실제 SQL 보유 - 전 코퍼스 프로그램 939/939 고유, 전체 docker make -j4 = EXIT 0, 958 오브젝트 - 임시 생성기 제거, inventory.json loc 실측 갱신 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c3a0259e95
commit
93c3cb74af
1111 changed files with 31539 additions and 17258 deletions
|
|
@ -27,6 +27,16 @@ EXEC SQL INCLUDE sqlca;
|
|||
|
||||
TX_SERVICE(CL_OL_0025, ctx)
|
||||
{
|
||||
EXEC SQL BEGIN DECLARE SECTION;
|
||||
char h_biz_date[9];
|
||||
char h_severity[8];
|
||||
char h_target[32];
|
||||
char h_reqid[32];
|
||||
long h_recv;
|
||||
long h_fail;
|
||||
char h_alert[TX_VAL_LEN];
|
||||
EXEC SQL END DECLARE SECTION;
|
||||
|
||||
char bizdate[16];
|
||||
char reqid[32];
|
||||
char target[32];
|
||||
|
|
@ -34,6 +44,7 @@ TX_SERVICE(CL_OL_0025, ctx)
|
|||
const char *severity;
|
||||
long recv_cnt, fail_cnt, settled_cnt, done_cnt;
|
||||
long pending, total_cnt;
|
||||
long logged = 0;
|
||||
int need_alert;
|
||||
|
||||
tx_log(TX_LOG_INFO, "[CL_OL_0025] 알림 재발송 서비스 진입");
|
||||
|
|
@ -97,8 +108,46 @@ TX_SERVICE(CL_OL_0025, ctx)
|
|||
"[마감알림/%s] %s 마감 정상완료(정산완료 %ld건) - 조치 불필요",
|
||||
severity, bizdate, settled_cnt);
|
||||
|
||||
/*
|
||||
* 4) 알림 발송 이력 적재. 알림이 필요한 경우에만 cl_alert_log 에
|
||||
* 남기며, 발송 이력은 재발송 중복방지/감사추적의 근거가 된다.
|
||||
*/
|
||||
if (need_alert) {
|
||||
strncpy(h_biz_date, bizdate, sizeof(h_biz_date) - 1);
|
||||
h_biz_date[sizeof(h_biz_date) - 1] = '\0';
|
||||
strncpy(h_severity, severity, sizeof(h_severity) - 1);
|
||||
h_severity[sizeof(h_severity) - 1] = '\0';
|
||||
strncpy(h_target, target, sizeof(h_target) - 1);
|
||||
h_target[sizeof(h_target) - 1] = '\0';
|
||||
strncpy(h_reqid, reqid, sizeof(h_reqid) - 1);
|
||||
h_reqid[sizeof(h_reqid) - 1] = '\0';
|
||||
strncpy(h_alert, alert, sizeof(h_alert) - 1);
|
||||
h_alert[sizeof(h_alert) - 1] = '\0';
|
||||
h_recv = recv_cnt;
|
||||
h_fail = fail_cnt;
|
||||
|
||||
if (tx_begin() != TX_OK) {
|
||||
tx_log(TX_LOG_WARN, "[CL_OL_0025] tx_begin 경고");
|
||||
} else {
|
||||
EXEC SQL INSERT INTO cl_alert_log
|
||||
(biz_date, severity, recv_cnt, fail_cnt,
|
||||
target, reqid, alert_msg, sent_ts)
|
||||
VALUES (:h_biz_date, :h_severity, :h_recv, :h_fail,
|
||||
:h_target, :h_reqid, :h_alert, now());
|
||||
|
||||
if (sqlca.sqlcode != TX_SQL_OK) {
|
||||
TX_DBIO_LOG_ERR("CL_OL_0025 INSERT cl_alert_log");
|
||||
tx_abort();
|
||||
} else {
|
||||
logged = (long)sqlca.sqlerrd[2];
|
||||
tx_commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tx_buf_reset(ctx->out);
|
||||
tx_buf_sets(ctx->out, "RESPCODE", RESP_OK);
|
||||
tx_buf_setlong(ctx->out, "LOGGED", logged);
|
||||
tx_buf_sets(ctx->out, "TYPE", "ALERT");
|
||||
tx_buf_sets(ctx->out, "BIZDATE", bizdate);
|
||||
tx_buf_sets(ctx->out, "REQID", reqid);
|
||||
|
|
|
|||
Reference in a new issue