Commit Graph

3 Commits

Author SHA1 Message Date
f4b6a55b27 驳回
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 7m17s
2026-06-26 12:12:15 +09:00
c0c32c62f4 fix: 修复代理充值 Handler 缺少参数验证导致 check constraint 违反的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m18s
payment_method 字段传入中文值「线下转账」时,因 AgentRechargeHandler
未注入 validator 而跳过 oneof 验证,直接写入 DB 触发
chk_agent_recharge_method 约束报错。

- AgentRechargeHandler 注入 validator,Create 方法补加 Struct 验证
- bootstrap/handlers.go 传入 validate 实例
- openapi/handlers.go 补 nil 占位保持编译通过
2026-04-03 09:17:15 +08:00
89f9875a97 feat: 新增代理预充值模块(DTO、Service、Handler、路由)
- agent_recharge_dto.go: 创建/列表/详情请求响应 DTO
- service.go: 权限验证(代理只能充自己店铺)、金额范围校验、查询 active 配置、创建订单、线下充值确认(乐观锁+审计日志)、回调幂等处理
- agent_recharge.go Handler: Create/List/Get/OfflinePay 共 4 个方法
- agent_recharge.go 路由: 注册到 /api/admin/agent-recharges/*,路由层拦截企业账号

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 23:29:42 +08:00