fix: 资产钱包自动创建机制 — 修复C端购买时钱包不存在报错
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m8s

- client_order: 新增 getOrCreateWallet 兜底,钱包不存在时自动创建
- device_import: 设备导入事务内同步创建设备钱包
- iot_card_import: IoT卡批量导入后批量创建卡钱包
- queue/handler: 传递 AssetWalletStore 给两个导入 handler
- migration 000098: 为存量IoT卡和设备补建资产钱包
This commit is contained in:
2026-03-30 11:37:41 +08:00
parent 40809d11c5
commit f339fb1987
36 changed files with 1811 additions and 26 deletions

View File

@@ -0,0 +1,19 @@
## MODIFIED Requirements
### Requirement: 富友 JSAPI 预下单
`FuiouPayJSAPI` SHALL 使用 `pkg/fuiou/` SDK 完成真实预下单返回前端调起微信支付所需的参数appId, timeStamp, nonceStr, package, signType, paySign。SHALL NOT 再返回"暂未实现"错误。
#### Scenario: 公众号内富友支付
- **WHEN** C端用户在微信公众号内发起订单支付支付通道为富友
- **THEN** 系统 SHALL 从 `tb_wechat_config` 读取激活的富友配置,调用 `fuiou.Client.WxPreCreate` 完成预下单,返回 JS-SDK 调起参数
#### Scenario: 富友配置未激活
- **WHEN** 发起富友支付但 `tb_wechat_config` 中无 `provider_type='fuiou' AND is_active=true` 的配置
- **THEN** 系统 SHALL 返回 `CodeFuiouPayFailed` 错误
### Requirement: 富友 MiniApp 预下单
`FuiouPayMiniApp` SHALL 使用与 JSAPI 相同的流程,但 `tradeType``LETPAY``subAppid` 使用小程序 AppID。
#### Scenario: 小程序内富友支付
- **WHEN** C端用户在微信小程序内发起订单支付支付通道为富友
- **THEN** 系统 SHALL 使用小程序 AppID 和 `LETPAY` 类型完成预下单