feat(backend): 对齐业务服务额度与内容治理口径
仪表盘待办与穿搭概况改为公开/私密/已封禁口径,移除恒为零的待审核统计;补齐额度凭证来源 source=4 与流水 change_type=7 枚举及订单商品类型、额度有效期快照字段;管理员发放与回收额度凭证在同一事务内写入人工调整流水,回收流水使用独立 order_no 避免撞唯一索引,并增加凭证归属校验;对齐 Quota 配置免费额度值,同步更新 README 与配置说明。
This commit is contained in:
+13
-11
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ type OrderItem struct {
|
||||
OrderStatus int8 `json:"order_status"`
|
||||
TransactionID string `json:"transaction_id"`
|
||||
MemberDays int64 `json:"member_days"`
|
||||
GoodsType int8 `json:"goods_type"` // 商品类型快照 1=会员包 2=上传包 3=AI推荐包 4=衣柜分享包 5=搭配分享包
|
||||
QuotaValidDays int64 `json:"quota_valid_days"` // 额度有效期天数快照(加量包按此计算赠送有效期;会员包为 0 表示跟随 VIP)
|
||||
UploadQuota int64 `json:"upload_quota"`
|
||||
AIRecommendQuota int64 `json:"ai_recommend_quota"`
|
||||
ClosetShareQuota int64 `json:"closet_share_quota"`
|
||||
|
||||
@@ -47,7 +47,7 @@ type UserGrantItem struct {
|
||||
QuotaType int8 `json:"quota_type"` // 1=上传 2=AI 3=社区分享 4=衣柜分享
|
||||
Amount int64 `json:"amount"` // 赠送总量(Cos=一次性库存;AI/社区/衣柜=有效期内每日加量)
|
||||
Used int64 `json:"used"` // 已用量(仅 Cos 扣减)
|
||||
Source int8 `json:"source"` // 1=会员包 2=加量包 3=广告激励
|
||||
Source int8 `json:"source"` // 1=会员包 2=加量包 3=广告激励 4=体验会员赠送
|
||||
ExpireTime int64 `json:"expire_time"` // 到期时间(秒,0=跟随 VIP)
|
||||
RefID string `json:"ref_id"` // 关联ID(订单号/广告记录ID/人工发放标识)
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
|
||||
Reference in New Issue
Block a user