feat: 新增租户余额内部查询与扣减接口

This commit is contained in:
2026-08-17 17:49:48 +08:00
parent 9caf09d005
commit 6be442bfde
3 changed files with 85 additions and 0 deletions
+21
View File
@@ -58,6 +58,27 @@ type TenantEditReq struct {
type TenantEditRes struct {
}
// TenantBalanceReq 查询租户余额(内部接口,model-gateway 调用,不走 gftoken/Auth
type TenantBalanceReq struct {
g.Meta `path:"/tenant/balance" tags:"租户余额(内部)" method:"get" summary:"查询租户余额"`
TenantId uint64 `p:"tenantId" v:"required#租户id不能为空"`
}
type TenantBalanceRes struct {
g.Meta `mime:"application/json"`
Tenant *entity.Tenant `json:"tenant"`
}
// TenantDeductReq 扣减租户余额(内部接口,model-gateway 调用;surplus 传负值即扣减)
type TenantDeductReq struct {
g.Meta `path:"/tenant/deduct" tags:"租户余额(内部)" method:"post" summary:"扣减租户余额"`
Id int64 `p:"id" v:"required#租户id不能为空"`
Surplus float64 `p:"surplus"`
}
type TenantDeductRes struct {
}
// GetTenantDetailsByIdsReq 获取多个租户详情请求参数
type GetTenantDetailsByIdsReq struct {
g.Meta `path:"/tenant/getTenantDetailsByIds" tags:"租户管理" method:"get" summary:"获取多个租户详情"`