Compare commits
No commits in common. "57763c634e0e6733d0861051f6b78c5dcdb9022f" and "692ac419f6fab7da63e90e74e06d200e427580fa" have entirely different histories.
57763c634e
...
692ac419f6
@ -1,140 +0,0 @@
|
|||||||
# 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