423 lines
20 KiB
Markdown
423 lines
20 KiB
Markdown
# REV004 accountProcess 集成测试方案 bootstrap(2026-04-13)
|
||
|
||
## 本轮已落地 bootstrap
|
||
- 新增 `AbstractRev004AccountProcessIntegrationTest`:定义真实数据库 + 外部依赖默认替身化的测试基类
|
||
- 新增 `Rev004AccountProcessLiveDbReadinessTest`:在提供 `REV004_IT_DB_*` 环境变量时,检查真实数据库所需表是否可见
|
||
- 新增 `Rev004AccountProcessIntegrationFixtureAssetsTest`:校验 fixture 资源文件存在
|
||
- 新增 `src/test/resources/sql/rev004/accountprocess/*.sql`:为 prestorage/sold/unsold/accountLog 预留 fixture 分层入口
|
||
|
||
## 当前价值
|
||
- 把“真实数据库 + 外部依赖替身化”的执行边界固化到测试骨架
|
||
- 把场景矩阵的 fixture 入口落到仓库,便于后续继续实现 query/action/close-loop 场景
|
||
- 在未提供真实数据库环境变量时,不强行执行 live DB readiness 测试
|
||
|
||
## 下一步建议
|
||
1. 补 `prestorage` 第 1 条全闭环场景
|
||
2. 补 `sold` 的 `isHistory` + submit/撤销场景
|
||
3. 补 `accountLog` 的 refund/prestorage 二次动作场景
|
||
|
||
|
||
## Canary 补充
|
||
- 新增 `Rev004AccountProcessCanaryQueryIntegrationTest`:在提供 `REV004_IT_DB_*` 环境变量时,真正启动 Spring + MockMvc,打通 `prestorage-page` 只读 query 作为最小 canary。
|
||
- 当前 fixture 仍是 bootstrap 占位,因此该 canary 的目标是“验活骨架”,不是验证完整业务数据闭环。
|
||
|
||
|
||
## Fresh verification
|
||
- 执行:`mvn -Dtest='Rev004AccountProcessIntegrationFixtureAssetsTest,Rev004AccountProcessLiveDbReadinessTest,Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果:BUILD SUCCESS
|
||
- 细项:
|
||
- Fixture assets: 1 pass
|
||
- Live DB readiness: 1 skipped(未提供 `REV004_IT_DB_*` 环境变量时跳过)
|
||
- Canary query: 1 skipped(未提供 `REV004_IT_DB_*` 环境变量时跳过)
|
||
|
||
|
||
## Real DB canary verification
|
||
- 执行环境:使用 `application-local.yaml` 中 PostgreSQL 连接参数,以 `REV004_IT_DB_*` 环境变量注入
|
||
- 执行:`mvn -Dtest='Rev004AccountProcessIntegrationFixtureAssetsTest,Rev004AccountProcessLiveDbReadinessTest,Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果:BUILD SUCCESS
|
||
- 明细:
|
||
- Fixture assets: 1 pass
|
||
- Live DB readiness: 1 pass
|
||
- Canary query (`/admin-api/business/accounting-adjust/prestorage-page`): 1 pass
|
||
- 说明:当前 canary 证明了真实数据库 + Spring context + MockMvc + route wiring 可启动并返回成功包装;但 fixture 仍是最小占位,尚未证明完整业务数据闭环。
|
||
|
||
|
||
## Real DB full bootstrap verification
|
||
- 执行环境:使用 `application-local.yaml` 中 PostgreSQL 连接参数,经 `REV004_IT_DB_*` 环境变量注入
|
||
- 执行:`mvn -Dtest='Rev004AccountProcessIntegrationFixtureAssetsTest,Rev004AccountProcessLiveDbReadinessTest,Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果:BUILD SUCCESS
|
||
- 明细:
|
||
- Fixture assets: 1 pass
|
||
- Live DB readiness: 1 pass
|
||
- Canary query (`/admin-api/business/accounting-adjust/prestorage-page`): 1 pass
|
||
- 说明:当前已经从“资产存在”推进到“真实数据库 + Spring context + MockMvc + canary query 验活成功”。
|
||
- 剩余缺口:fixture 仍是最小占位,尚未验证完整业务数据闭环。
|
||
|
||
|
||
## First real close-loop scenario
|
||
- 场景:`prestorage-submit` 预存退款
|
||
- 测试文件:`Rev004AccountProcessCanaryQueryIntegrationTest`
|
||
- 使用真实数据库中的独立测试数据(`REV004_IT_SRC` / `biz_account.id=900001`)
|
||
- 断言:
|
||
- `POST /admin-api/business/accounting-adjust/prestorage-submit` 返回成功包装
|
||
- 账户余额由 `100.00` 变为 `90.00`
|
||
- `biz_operat_log` 写入 1 条 `旧预存调整` 日志
|
||
- `biz_operat_log_detail` 中存在与返回 `adjustmentNo` 对应的明细记录
|
||
- 执行:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果:BUILD SUCCESS(2 tests / 0 fail / 0 skip)
|
||
|
||
|
||
## Sold close-loop scenario
|
||
- 场景:`sold-submit` 已销调整申请
|
||
- 测试文件:`Rev004AccountProcessCanaryQueryIntegrationTest`
|
||
- 使用真实数据库中的独立测试营业账数据(`biz_charge.id=900002`,`pay_state=1`)
|
||
- 断言:
|
||
- `POST /admin-api/business/accounting-adjust/sold-submit` 返回成功包装
|
||
- 返回 `resultStatus = PENDING_APPROVAL`
|
||
- `biz_operat_log` 写入 1 条 `旧账务兼容动作` 日志
|
||
- `biz_operat_log_detail` 中存在与返回 `adjustmentNo` 对应的明细记录
|
||
- 结果:与 prestorage canary 一起执行,`Rev004AccountProcessCanaryQueryIntegrationTest` 当前为 3 tests / 0 fail / 0 skip
|
||
|
||
|
||
## AccountLog close-loop scenario
|
||
- 场景:`log-prestorage` 二次动作
|
||
- 测试文件:`Rev004AccountProcessCanaryQueryIntegrationTest`
|
||
- 使用真实数据库中的独立源记录(`adjustmentNo=REV004-LOG-900003`,`biz_charge.id=900003`)与目标账户(`REV004_IT_TGT` / `biz_account.id=900004`)
|
||
- 断言:
|
||
- `POST /admin-api/business/accounting-adjust/log-prestorage` 返回成功包装
|
||
- 源营业账 `pay_state` 被清为 `0`(未收)
|
||
- 目标账户余额增加到 `20.00`
|
||
- `biz_operat_log` 写入 1 条 `旧账务兼容动作` 日志
|
||
- `biz_operat_log_detail` 中存在与返回 `adjustmentNo` 对应的明细记录
|
||
- 结果:与 prestorage/sold 场景一起执行时,`Rev004AccountProcessCanaryQueryIntegrationTest` 当前为 4 tests / 0 fail / 0 skip
|
||
|
||
|
||
## AccountLog process query scenario
|
||
- 场景:`log-process` 读取已有调整记录流程摘要
|
||
- 测试文件:`Rev004AccountProcessCanaryQueryIntegrationTest`
|
||
- 使用真实数据库中的独立源记录(`adjustmentNo=REV004-LOG-900003`)
|
||
- 断言:
|
||
- `GET /admin-api/business/accounting-adjust/log-process` 返回成功包装
|
||
- `processState = UPDATED`
|
||
- `resultStatus = SUCCESS`
|
||
|
||
## Current canary suite status
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest` 当前为 5 tests / 0 fail / 0 skip
|
||
- 已覆盖:query canary、prestorage-submit、sold-submit、log-prestorage、log-process
|
||
|
||
## 2026-04-13 最新推进:accountLog refund 闭环补齐
|
||
- 新增 `TransactionApi` 的 `@MockBean` 注入到 `AbstractRev004AccountProcessIntegrationTest`,确保真实数据库之外的交易后续流水依赖保持替身化。
|
||
- 更新 `40_accountlog_seed.sql`:为 `REV004-LOG-900003` 补入 `originalTranSeq=T-900003`、`originalSysTranSeq=SYS-900003`,使 `log-refund` 路径具备真实可执行前置数据。
|
||
- 新增 canary 闭环用例:`logRefund_shouldClearChargePaymentAndWriteFollowupLog`
|
||
|
||
### 新增闭环断言
|
||
- `POST /admin-api/business/accounting-adjust/log-refund`
|
||
- 返回:`resultStatus=SUCCESS`、`objectType=PREPAID_REFUND`、`writeBackStatus=UPDATED`
|
||
- 数据库断言:
|
||
- `biz_charge.id=900003` 的 `pay_state` 从已收改为 `0`
|
||
- `biz_operat_log` 中新增 1 条 `账务调整` 日志,`operat_content` 含返回的 `adjustmentNo`
|
||
- `biz_operat_log_detail` 中存在 `bankTranSeq=RF-900003`
|
||
- 替身断言:`TransactionApi.createFollowupTransaction(...)` 被调用
|
||
|
||
### 本次真实库验证
|
||
- 执行 1:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果 1:BUILD SUCCESS
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 7 tests / 0 fail / 0 skip
|
||
- 执行 2:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcess*' test`
|
||
- 结果 2:BUILD SUCCESS
|
||
- `Rev004AccountProcessLiveDbReadinessTest`: 1 pass
|
||
- `Rev004AccountProcessIntegrationFixtureAssetsTest`: 1 pass
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 7 pass
|
||
- 总计:9 tests / 0 fail / 0 skip
|
||
|
||
### 当前 canary 套件真实覆盖
|
||
- `prestorage-page_shouldReturnSuccessEnvelope`
|
||
- `prestorageSubmit_shouldChangeBalanceAndWriteOperatLog`
|
||
- `soldSubmit_shouldWritePendingOperatLog`
|
||
- `logPrestorage_shouldClearChargePaymentAndIncreaseTargetDeposit`
|
||
- `logProcess_shouldReturnUpdatedProcessSummary`
|
||
- `logAttachments_shouldReturnUnresolvedAttachmentRef`
|
||
- `logRefund_shouldClearChargePaymentAndWriteFollowupLog`
|
||
|
||
### 仍待继续
|
||
- `unsold` 五类 happy path 真实库闭环
|
||
- `revoke/log-revoke/sold-batch-revoke` 的真实库撤销链验证
|
||
- 更高一层的“提交 -> 查询页回看 -> detail/process/attachments 全链联动”场景编排
|
||
|
||
## 2026-04-13 继续推进:撤销链真实库闭环补齐
|
||
- 新增真实库撤销链 canary:
|
||
- `prestorageRevoke_shouldRestoreBalanceAndWriteRevokeLog`
|
||
- `soldBatchRevoke_shouldWriteRevokeLogForPendingSyntheticRecord`
|
||
- `logRevoke_shouldRestoreChargePaymentAndRollbackTransferredDeposit`
|
||
- 为支持旧兼容动作撤销,本轮同时修正 `AccountingAdjustProcessServiceImpl.findSyntheticSnapshot(...)`:
|
||
- 改为按 `adjustmentNo` 直接回查 operat_log / operat_log_detail
|
||
- 避免旧预存调整 / 旧日志转预存 场景在撤销时误落入 unified snapshot 分支
|
||
|
||
### 新增闭环断言
|
||
1. `prestorage-revoke`
|
||
- 先发起 `prestorage-submit`
|
||
- 再调用 `POST /admin-api/business/accounting-adjust/prestorage-revoke`
|
||
- 断言:
|
||
- 返回 `actionType=REVOKE`
|
||
- `biz_account.id=900001.deposit` 从 `90.00` 恢复到 `100.00`
|
||
- 存在 `revokeOfAdjustmentNo=<原adjustmentNo>` 明细
|
||
|
||
2. `sold-batch-revoke`
|
||
- 先发起 `sold-submit`
|
||
- 再调用 `POST /admin-api/business/accounting-adjust/sold-batch-revoke`
|
||
- 断言:
|
||
- `successCount=1`
|
||
- 存在 `revokeOfAdjustmentNo=<原adjustmentNo>` 明细
|
||
|
||
3. `log-revoke`
|
||
- 先发起 `log-prestorage`
|
||
- 再调用 `POST /admin-api/business/accounting-adjust/log-revoke`
|
||
- 断言:
|
||
- 返回 `actionType=REVOKE`
|
||
- `biz_charge.id=900003.pay_state` 恢复为 `1`
|
||
- `charge_method` 恢复为 `2`
|
||
- `charge_way` 恢复为 `6`
|
||
- `biz_account.id=900004.deposit` 从 `20.00` 回退到 `0.00`
|
||
- 存在 `revokeOfAdjustmentNo=<原adjustmentNo>` 明细
|
||
|
||
### 本次真实库验证
|
||
- 执行 1:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果 1:BUILD SUCCESS
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 10 tests / 0 fail / 0 skip
|
||
- 执行 2:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcess*' test`
|
||
- 结果 2:BUILD SUCCESS
|
||
- `Rev004AccountProcessLiveDbReadinessTest`: 1 pass
|
||
- `Rev004AccountProcessIntegrationFixtureAssetsTest`: 1 pass
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 10 pass
|
||
- 总计:12 tests / 0 fail / 0 skip
|
||
|
||
### 当前 canary 套件真实覆盖(10 条)
|
||
- `prestoragePage_shouldReturnSuccessEnvelope`
|
||
- `prestorageSubmit_shouldChangeBalanceAndWriteOperatLog`
|
||
- `prestorageRevoke_shouldRestoreBalanceAndWriteRevokeLog`
|
||
- `soldSubmit_shouldWritePendingOperatLog`
|
||
- `soldBatchRevoke_shouldWriteRevokeLogForPendingSyntheticRecord`
|
||
- `logPrestorage_shouldClearChargePaymentAndIncreaseTargetDeposit`
|
||
- `logRevoke_shouldRestoreChargePaymentAndRollbackTransferredDeposit`
|
||
- `logProcess_shouldReturnUpdatedProcessSummary`
|
||
- `logAttachments_shouldReturnUnresolvedAttachmentRef`
|
||
- `logRefund_shouldClearChargePaymentAndWriteFollowupLog`
|
||
|
||
## 2026-04-13 继续推进:unsold 五类真实库 happy path 补齐
|
||
- 新增 `30_unsold_seed.sql` 真实库 fixture:
|
||
- `biz_cust.id=900005 / code=REV004_IT_UNSOLD`
|
||
- `biz_charge.id=900005 / pay_state=0 / bill_amount=120.00 / extended_amount=120.00 / late_fee=30.00`
|
||
- 扩展 `00_reset.sql`,纳入 `900005 / REV004_IT_UNSOLD` 清理范围
|
||
- 新增 5 条真实库 canary:
|
||
- `unsoldAdjustSubmit_shouldUpdateAmountsAndWriteOperatLog`
|
||
- `unsoldSplitSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldLateFeeReduceSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldPriceDiffSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldBadDebtSubmit_shouldCreatePendingApprovalRecord`
|
||
|
||
### 新增闭环断言
|
||
1. `unsold-adjust-submit`
|
||
- 返回 `SUCCESS`
|
||
- `biz_charge.id=900005.extended_amount` 更新为 `88.88`
|
||
- `bill_amount` 更新为 `80.00`
|
||
- `biz_operat_log.operat_content` 含返回 `adjustmentNo`
|
||
|
||
2. `unsold-split-submit`
|
||
- 返回 `PENDING_APPROVAL`
|
||
- `objectType=SPLIT_ADJUST`
|
||
- `biz_operat_log.operat_content` 含返回 `adjustmentNo`
|
||
|
||
3. `unsold-late-fee-reduce-submit`
|
||
- 返回 `PENDING_APPROVAL`
|
||
- `objectType=LATE_FEE_REDUCE`
|
||
- `biz_operat_log.operat_content` 含返回 `adjustmentNo`
|
||
|
||
4. `unsold-price-diff-submit`
|
||
- 返回 `PENDING_APPROVAL`
|
||
- `objectType=PRICE_DIFF_ADJUST`
|
||
- `biz_operat_log.operat_content` 含返回 `adjustmentNo`
|
||
|
||
5. `unsold-bad-debt-submit`
|
||
- 返回 `PENDING_APPROVAL`
|
||
- `objectType=BAD_DEBT_RECORD`
|
||
- `biz_operat_log.operat_content` 含返回 `adjustmentNo`
|
||
|
||
### 本次真实库验证
|
||
- 执行 1:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果 1:BUILD SUCCESS
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 15 tests / 0 fail / 0 skip
|
||
- 执行 2:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcess*' test`
|
||
- 结果 2:BUILD SUCCESS
|
||
- `Rev004AccountProcessLiveDbReadinessTest`: 1 pass
|
||
- `Rev004AccountProcessIntegrationFixtureAssetsTest`: 1 pass
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 15 pass
|
||
- 总计:17 tests / 0 fail / 0 skip
|
||
|
||
### 当前 canary 套件真实覆盖(15 条)
|
||
- `prestoragePage_shouldReturnSuccessEnvelope`
|
||
- `prestorageSubmit_shouldChangeBalanceAndWriteOperatLog`
|
||
- `prestorageRevoke_shouldRestoreBalanceAndWriteRevokeLog`
|
||
- `soldSubmit_shouldWritePendingOperatLog`
|
||
- `soldBatchRevoke_shouldWriteRevokeLogForPendingSyntheticRecord`
|
||
- `unsoldAdjustSubmit_shouldUpdateAmountsAndWriteOperatLog`
|
||
- `unsoldSplitSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldLateFeeReduceSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldPriceDiffSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldBadDebtSubmit_shouldCreatePendingApprovalRecord`
|
||
- `logPrestorage_shouldClearChargePaymentAndIncreaseTargetDeposit`
|
||
- `logRevoke_shouldRestoreChargePaymentAndRollbackTransferredDeposit`
|
||
- `logProcess_shouldReturnUpdatedProcessSummary`
|
||
- `logAttachments_shouldReturnUnresolvedAttachmentRef`
|
||
- `logRefund_shouldClearChargePaymentAndWriteFollowupLog`
|
||
|
||
### 剩余待补
|
||
- 更高一层的“提交 -> page/stat/detail/process/attachments 联动回看”场景编排
|
||
- 若要进一步贴近前端验收,可再补一轮按弹窗功能分组的端到端查询/动作串联用例
|
||
|
||
## 2026-04-13 继续推进:提交后联动回看场景补齐
|
||
- 新增 3 条更贴近前端验收的联动回看 canary:
|
||
- `prestorageSubmit_thenPageStatAndDetailShouldExposeNewRecord`
|
||
- `soldSubmit_thenSoldPageAndStatShouldExposePendingRevokeCapability`
|
||
- `logSeed_thenPageStatDetailProcessAndAttachmentsShouldStayConsistent`
|
||
|
||
### 新增联动断言
|
||
1. `prestorage` 提交后联动回看
|
||
- 提交 `prestorage-submit`
|
||
- 再查:
|
||
- `prestorage-page`
|
||
- `prestorage-stat`
|
||
- `prestorage-detail`
|
||
- 断言:
|
||
- page 能看到新 `adjustmentNo`
|
||
- stat 的 `totalCount=1 / refundCount=1`
|
||
- detail 返回 `resultStatus=SUCCESS / writeBackStatus=UPDATED`
|
||
|
||
2. `sold` 提交后联动回看
|
||
- 提交 `sold-submit`
|
||
- 再查:
|
||
- `sold-page`
|
||
- `sold-stat`
|
||
- 断言:
|
||
- page 仍能看到 `biz_charge.id=900002`
|
||
- `canBatchRevoke=true`
|
||
- stat 的 `totalCount=1 / totalActualAmount=80.00`
|
||
|
||
3. `log` 全链回看
|
||
- 基于 `40_accountlog_seed.sql` 中的 `REV004-LOG-900003`
|
||
- 依次验证:
|
||
- `log-page`
|
||
- `log-stat`
|
||
- `log-detail`
|
||
- `log-process`
|
||
- `log-attachments`
|
||
- 断言:
|
||
- page 可见 `adjustmentNo=REV004-LOG-900003`
|
||
- stat `completedCount=1`
|
||
- detail 包含 `originalTranSeq=T-900003` 与 `attachmentRefs[0]=mock-ref-1`
|
||
- process `processState=UPDATED`
|
||
- attachments 可返回 `mock-ref-1`
|
||
|
||
### 本次真实库验证
|
||
- 执行 1:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果 1:BUILD SUCCESS
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 18 tests / 0 fail / 0 skip
|
||
- 执行 2:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcess*' test`
|
||
- 结果 2:BUILD SUCCESS
|
||
- `Rev004AccountProcessLiveDbReadinessTest`: 1 pass
|
||
- `Rev004AccountProcessIntegrationFixtureAssetsTest`: 1 pass
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 18 pass
|
||
- 总计:20 tests / 0 fail / 0 skip
|
||
|
||
### 当前真实库 canary 覆盖(18 条)
|
||
- `prestoragePage_shouldReturnSuccessEnvelope`
|
||
- `prestorageSubmit_shouldChangeBalanceAndWriteOperatLog`
|
||
- `prestorageRevoke_shouldRestoreBalanceAndWriteRevokeLog`
|
||
- `prestorageSubmit_thenPageStatAndDetailShouldExposeNewRecord`
|
||
- `soldSubmit_shouldWritePendingOperatLog`
|
||
- `soldBatchRevoke_shouldWriteRevokeLogForPendingSyntheticRecord`
|
||
- `soldSubmit_thenSoldPageAndStatShouldExposePendingRevokeCapability`
|
||
- `unsoldAdjustSubmit_shouldUpdateAmountsAndWriteOperatLog`
|
||
- `unsoldSplitSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldLateFeeReduceSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldPriceDiffSubmit_shouldCreatePendingApprovalRecord`
|
||
- `unsoldBadDebtSubmit_shouldCreatePendingApprovalRecord`
|
||
- `logPrestorage_shouldClearChargePaymentAndIncreaseTargetDeposit`
|
||
- `logRevoke_shouldRestoreChargePaymentAndRollbackTransferredDeposit`
|
||
- `logSeed_thenPageStatDetailProcessAndAttachmentsShouldStayConsistent`
|
||
- `logProcess_shouldReturnUpdatedProcessSummary`
|
||
- `logAttachments_shouldReturnUnresolvedAttachmentRef`
|
||
- `logRefund_shouldClearChargePaymentAndWriteFollowupLog`
|
||
|
||
### 当前剩余缺口
|
||
- 若要进一步逼近前端验收,可继续补“弹窗 A/B/C 对应多接口切换”的编排式测试摘要
|
||
- 以及基于接口返回字段做一版更面向页面的 contract/assertion matrix
|
||
|
||
## 2026-04-13 继续推进:unsold 查询面真实库回看补齐
|
||
- 新增 2 条真实库查询联动 canary:
|
||
- `unsoldSeed_thenPageAndStatShouldExposeChargeSnapshot`
|
||
- `unsoldAdjustSubmit_thenPageAndStatShouldReflectUpdatedAmounts`
|
||
|
||
### 新增断言
|
||
1. `unsold` 初始查询面
|
||
- `GET /admin-api/business/accounting-adjust/unsold-page`
|
||
- `GET /admin-api/business/accounting-adjust/unsold-stat`
|
||
- 断言:
|
||
- `biz_charge.id=900005` 可见
|
||
- `totalAmount=120.00`
|
||
- `billAmount=120.00`
|
||
- `penaltyAmount=30.00`
|
||
- `canAdjust/canSplit/canLateFeeReduce/canPriceDiffAdjust/canBadDebtAdjust=true`
|
||
- stat:`sumWaterVolume=5.000 / sumTotalAmount=120.00 / sumBillAmount=120.00 / sumPenaltyAmount=30.00`
|
||
|
||
2. `unsold-adjust-submit` 后查询面回看
|
||
- 先提交 `unsold-adjust-submit`
|
||
- 再查 `unsold-page / unsold-stat`
|
||
- 断言:
|
||
- page 中 `totalAmount=88.88`
|
||
- page 中 `billAmount=80.00`
|
||
- stat 中 `sumTotalAmount=88.88`
|
||
- stat 中 `sumBillAmount=80.00`
|
||
|
||
### 本次真实库验证
|
||
- 执行 1:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcessCanaryQueryIntegrationTest' test`
|
||
- 结果 1:BUILD SUCCESS
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 20 tests / 0 fail / 0 skip
|
||
- 执行 2:`REV004_IT_DB_URL=... REV004_IT_DB_USERNAME=... REV004_IT_DB_PASSWORD=... mvn -Dtest='Rev004AccountProcess*' test`
|
||
- 结果 2:BUILD SUCCESS
|
||
- `Rev004AccountProcessLiveDbReadinessTest`: 1 pass
|
||
- `Rev004AccountProcessIntegrationFixtureAssetsTest`: 1 pass
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: 20 pass
|
||
- 总计:22 tests / 0 fail / 0 skip
|
||
|
||
### 影响
|
||
- `prestorage / sold / unsold / log` 四条主查询面现在都至少有一组真实库回看证据
|
||
- 剩余未补重点从“主链查询缺口”收敛为“预存页流程/附件链路 + 字典/UI文案展示一致性”
|
||
|
||
## 2026-04-13 继续推进:prestorage process / attachments 真实库补齐
|
||
- 新增 canary:`prestorageSubmit_thenProcessAndAttachmentsShouldExposeReturnedAdjustmentNo`
|
||
- 在 `prestorage-submit` 场景中附带 `attachmentRefs=[pre-proof-2, pre-proof-3]`
|
||
- 提交后继续验证:
|
||
- `GET /admin-api/business/accounting-adjust/prestorage-process`
|
||
- `GET /admin-api/business/accounting-adjust/prestorage-attachments`
|
||
|
||
### 新增断言
|
||
- process:
|
||
- `adjustmentNo` 与提交返回一致
|
||
- `resultStatus=SUCCESS`
|
||
- `approvalStatus=NOT_REQUIRED`
|
||
- `writeBackStatus=UPDATED`
|
||
- `processState=UPDATED`
|
||
- `stages[0].message` 存在
|
||
- attachments:
|
||
- 返回两条附件引用
|
||
- `ref=pre-proof-2 / pre-proof-3`
|
||
- `resolved=false`
|
||
|
||
### 本次真实库验证
|
||
- `Rev004AccountProcessCanaryQueryIntegrationTest`: **21 tests / 0 fail / 0 skip**
|
||
- `Rev004AccountProcess*`: **总计 23 tests / 0 fail / 0 skip**
|
||
|
||
### 影响
|
||
- `prestorage` 查询/提交流程/撤销/流程查看/附件查看 这一组链路现在都已有真实库证据
|
||
- 剩余缺口进一步收敛到:字典 label / UI 文案一致性、边角筛选条件穷尽、UI 编排级验证
|