feat(backend): 对齐业务服务额度与内容治理口径

仪表盘待办与穿搭概况改为公开/私密/已封禁口径,移除恒为零的待审核统计;补齐额度凭证来源 source=4 与流水 change_type=7 枚举及订单商品类型、额度有效期快照字段;管理员发放与回收额度凭证在同一事务内写入人工调整流水,回收流水使用独立 order_no 避免撞唯一索引,并增加凭证归属校验;对齐 Quota 配置免费额度值,同步更新 README 与配置说明。
This commit is contained in:
2026-09-16 02:58:56 +08:00
parent 5d6109bb52
commit 0863234bc5
13 changed files with 460 additions and 110 deletions
+13 -11
View File
@@ -40,11 +40,12 @@ type DashboardRevenue struct {
RefundTotal int64 `json:"refund_total"` // 累计退款
}
// DashboardTodo 待办统计。
// DashboardTodo 待办与核心概览。
type DashboardTodo struct {
RefundPending int64 `json:"refund_pending"` // 待处理退款
OutfitPendingAudit int64 `json:"outfit_pending_audit"` // 待审核穿搭
GoodsOnShelf int64 `json:"goods_on_shelf"` // 上架商品数
RefundPending int64 `json:"refund_pending"` // 待处理退款
OutfitPublicTotal int64 `json:"outfit_public_total"` // 公开展示中的穿搭数(不含已封禁)
OutfitBanned int64 `json:"outfit_banned"` // 已封禁穿搭
GoodsOnShelf int64 `json:"goods_on_shelf"` // 上架商品数
}
// ===== 内容审核概况 =====
@@ -56,13 +57,14 @@ type DashboardContent struct {
Share DashboardShareStats `json:"share"`
}
// DashboardOutfitStats 穿搭审核统计。
// DashboardOutfitStats 穿搭内容概况。
// 业务侧用户公开穿搭时即自动过审,审核不再是公开的前置条件,故不再输出审核状态分布;
// 公开/私密按 is_public 统计且均已剔除已封禁,三者在图表中互不重叠。
type DashboardOutfitStats struct {
Total int64 `json:"total"` // 穿搭总数
Pending int64 `json:"pending"` // 待审核
Passed int64 `json:"passed"` // 审核通过
Rejected int64 `json:"rejected"` // 审核不通过
Banned int64 `json:"banned"` // 封禁
Total int64 `json:"total"` // 穿搭总数
Public int64 `json:"public"` // 公开展示中(不含已封禁)
Private int64 `json:"private"` // 私密(不含已封禁)
Banned int64 `json:"banned"` // 已封禁
}
// DashboardClothesStats 衣物图片处理统计。
@@ -105,7 +107,7 @@ type DashboardGoods struct {
// GoodsTypeCount 商品类型数量。
type GoodsTypeCount struct {
Type int8 `json:"type"` // 1会员包 2上传包 3AI推荐包 4衣柜分享包 5搭配分享包
Type int8 `json:"type"` // 1会员包 2上传包 3AI推荐包 4衣柜分享包 5搭配分享包
Count int64 `json:"count"`
}