Capture redink formal-table dev-db evidence for REV004
This records the application-dev DDL apply/replay, compile and targeted test evidence, fresh jar query smoke, cleanup proof, and the precise external blocker observed when attempting live REDINK_RECORD execute smoke. Constraint: Evidence must reflect the actually verified REDINK_RECORD formal-table scope and explicitly separate completed verification from blocked live-execute proof Rejected: Present live execute smoke as fully complete | inaccurate because business-bank-server was unavailable Confidence: high Scope-risk: narrow Reversibility: clean Directive: When business-bank-server becomes available, append a dated live-execute follow-up section instead of overwriting this baseline evidence Tested: Cross-checked against backend compile/test outputs, psql results, query smoke, and application log exception trace on 2026-04-17 Not-tested: No document export/render pipeline executed for this evidence-only commit
This commit is contained in:
parent
692ac419f6
commit
f1211d328c
@ -0,0 +1,140 @@
|
|||||||
|
# REV004 redink formal-table 已应用到 application-dev 测试库(2026-04-17)
|
||||||
|
|
||||||
|
## 目标库
|
||||||
|
依据:
|
||||||
|
- `sw-business/sw-business-server/src/main/resources/application-dev.yaml`
|
||||||
|
|
||||||
|
解析结果:
|
||||||
|
- Host:`192.168.10.130`
|
||||||
|
- Port:`5436`
|
||||||
|
- DB:`sw_system`
|
||||||
|
- User:`sw_system`
|
||||||
|
|
||||||
|
## 已执行脚本
|
||||||
|
- `sql/rev004/REV004_redink_formal_tables_deploy.sql`
|
||||||
|
|
||||||
|
## DDL 执行结果
|
||||||
|
结果:**PASS**
|
||||||
|
|
||||||
|
已确认存在:
|
||||||
|
- `biz_redink_record`
|
||||||
|
- `biz_redink_record_detail`
|
||||||
|
- `biz_redink_record_seq`
|
||||||
|
- `biz_redink_record_detail_seq`
|
||||||
|
|
||||||
|
已确认幂等重放通过:
|
||||||
|
- second apply 输出 existing/skip 结果
|
||||||
|
- 本轮顺手把 sequence 创建方式从 `CREATE SEQUENCE IF NOT EXISTS` 收口为显式 `pg_class` 检查,规避 replay 时 sequence 级重复键异常
|
||||||
|
|
||||||
|
## 代码验证
|
||||||
|
### compile
|
||||||
|
```bash
|
||||||
|
mvn -pl sw-business/sw-business-server -DskipTests compile
|
||||||
|
```
|
||||||
|
结果:**PASS**
|
||||||
|
|
||||||
|
### targeted tests
|
||||||
|
```bash
|
||||||
|
mvn -pl sw-business/sw-business-server -Dtest=ChargeServiceAccountingAdjustTest,AccountingAdjustQueryServiceImplTest,RedinkFormalizationServiceTest test
|
||||||
|
```
|
||||||
|
结果:**PASS**
|
||||||
|
- Tests run: 34
|
||||||
|
- Failures: 0
|
||||||
|
- Errors: 0
|
||||||
|
|
||||||
|
## fresh query smoke(fresh jar, port 48096)
|
||||||
|
### health
|
||||||
|
- `GET /actuator/health` -> `{"status":"UP"}`
|
||||||
|
|
||||||
|
### smoke 方式说明
|
||||||
|
REDINK_RECORD 当前依赖原交易定位 / bank follow-up 逻辑;本轮先采用:
|
||||||
|
1. application-dev 手工 seed 一条 redink formal 主表/明细表记录;
|
||||||
|
2. fresh jar 验证 `get/page` 是否已 formal-first 命中;
|
||||||
|
3. 不在本轮直接伪造 live bank follow-up 交易。
|
||||||
|
|
||||||
|
### seed 记录
|
||||||
|
- `adjustmentNo = REV004-RI-992305-SEED`
|
||||||
|
- `chargeId = 992305`
|
||||||
|
- formal 主表状态:
|
||||||
|
- `approvalStatus = NOT_REQUIRED`
|
||||||
|
- `executeStatus = UPDATED`
|
||||||
|
- `resultStatus = SUCCESS`
|
||||||
|
- bank follow-up 样例:`BK-992305`
|
||||||
|
|
||||||
|
### get / page
|
||||||
|
- `GET /admin-api/business/accounting-adjust/get?adjustmentNo=REV004-RI-992305-SEED`
|
||||||
|
- 返回:
|
||||||
|
- `objectType = REDINK_RECORD`
|
||||||
|
- `resultStatus = SUCCESS`
|
||||||
|
- `approvalStatus = NOT_REQUIRED`
|
||||||
|
- `writeBackStatus = UPDATED`
|
||||||
|
- `originalTranSeq = T-992305`
|
||||||
|
- `originalSysTranSeq = SYS-992305`
|
||||||
|
- detail 中包含:
|
||||||
|
- `bankTranSeq`
|
||||||
|
- `redinkAmount`
|
||||||
|
- `payStateBefore`
|
||||||
|
- `payStateAfter`
|
||||||
|
- `GET /admin-api/business/accounting-adjust/page?...objectType=REDINK_RECORD`
|
||||||
|
- 返回 1 条 formal-first 记录
|
||||||
|
- `reasonCodeLabel` 已能解析为字典文本(如 `收费错误`)
|
||||||
|
|
||||||
|
## 当前结论
|
||||||
|
本轮 redink formal-table 已达到:
|
||||||
|
1. DDL 可落库且可幂等重放;
|
||||||
|
2. 结果型 formal-table 主从表已建模;
|
||||||
|
3. query detail/page 对 `REDINK_RECORD` 已能返回 formal-first;
|
||||||
|
4. compile / targeted tests 通过;
|
||||||
|
5. fresh jar query smoke 已验证 formal-first 查询链路可用。
|
||||||
|
|
||||||
|
## 当前仍未完全覆盖
|
||||||
|
- 尚未完成“真实 redink 执行成功后自动落 formal 结果”的 live HTTP smoke;
|
||||||
|
- 原因是当前红冲依赖原交易与 bank follow-up 外部链路,需要在下一轮补真实可复现数据后再做完整 execute smoke。
|
||||||
|
|
||||||
|
## 测试数据清理
|
||||||
|
已删除:
|
||||||
|
- `biz_redink_record / detail`
|
||||||
|
- `biz_charge`
|
||||||
|
- `biz_cust`
|
||||||
|
|
||||||
|
回读结果:
|
||||||
|
- `redink_main_left=0`
|
||||||
|
- `redink_detail_left=0`
|
||||||
|
- `charge_left=0`
|
||||||
|
- `cust_left=0`
|
||||||
|
|
||||||
|
## 运行态清理
|
||||||
|
用于 fresh-jar query smoke 的临时实例:
|
||||||
|
- port `48096`
|
||||||
|
|
||||||
|
已停止,当前无残留 LISTEN 进程。
|
||||||
|
|
||||||
|
## live execute smoke 阻塞证据(2026-04-17 16:50 +08:00)
|
||||||
|
本轮额外尝试了真实 redink 执行链路:
|
||||||
|
- fresh jar:`48097`
|
||||||
|
- 请求:`POST /admin-api/business/charge/accounting-adjust`
|
||||||
|
- `objectType = REDINK_RECORD`
|
||||||
|
- `chargeId = 992306`
|
||||||
|
- `originalTranSeq = T-REDINK-NOPE`
|
||||||
|
|
||||||
|
接口响应:
|
||||||
|
```json
|
||||||
|
{"code":500,"data":null,"msg":"系统异常"}
|
||||||
|
```
|
||||||
|
|
||||||
|
从应用日志定位到的精确异常:
|
||||||
|
- `FeignException$ServiceUnavailable: [503]`
|
||||||
|
- `Load balancer does not contain an instance for the service business-bank-server`
|
||||||
|
- 失败位置:`TransactionApi#getTransactionByTranSeq(...)`
|
||||||
|
|
||||||
|
结论:
|
||||||
|
- 当前 live execute smoke 未能完成的直接原因是 **外部依赖 `business-bank-server` 在当前环境无可用实例**;
|
||||||
|
- 这不是 redink formal-table 本身的 DDL / 查询接线问题。
|
||||||
|
|
||||||
|
因此本批已完成:
|
||||||
|
- compile
|
||||||
|
- targeted tests
|
||||||
|
- DDL apply / replay
|
||||||
|
- fresh query smoke
|
||||||
|
|
||||||
|
但“真实 redink 执行成功后自动落 formal”的端到端 smoke 仍需在 `business-bank-server` 可用时补跑。
|
||||||
Loading…
x
Reference in New Issue
Block a user