支付功能动态化扩展

This commit is contained in:
2026-03-18 13:07:06 +08:00
parent 99853b8514
commit 9d996acf5f
16 changed files with 1402 additions and 195 deletions

View File

@@ -49,6 +49,20 @@ jsonb 类型转换问题,考虑一个高效的 any 到 struct 转换工具
冷数据迁移方案
## 开发环境
### 更新表结构的流程
1. 编辑 `scripts/sql/init.sql` 文件,参照原有格式,需要注意:
- 先写 drop table if exists 语句,确保脚本可以幂等执行
- 编写 create table 语句,按需添加审计字段和软删除字段 (created_at, updated_at, deleted_at)
- 为有必要的字段添加索引
- 为数据表及其字段添加注释
- 在文件末尾创建数据表流程全部结束后,为字段添加外键
2. 建议用数据库工具检查差异并增量更新,或者手动增量更新
3. 创建 model 文件,并将其添加到 gen 代码中
4. 生成查询文件
## 业务逻辑
### 订单关闭的几种方式