1、修复后台首页数据概览的团队积分消耗排行情况
2、修复后台交易流水数据
This commit is contained in:
@@ -162,8 +162,17 @@ class AdminCreditRecordSummaryOut(BaseModel):
|
||||
total_recharge: float = 0.0
|
||||
total_consume: float = 0.0
|
||||
total_refund: float = 0.0
|
||||
# 净消耗 = 真实消费(预扣释放不算)- 退款,这才是真正的"消耗了多少积分"口径
|
||||
# 前端展示"总消耗积分"时应使用此字段,而不是 total_consume(含未退回的)
|
||||
# 消费类分解(仅 type=consume,不含 team_internal 团队内部转账;真实扣费 + 预扣占用 = total_consume)
|
||||
# - total_charge : 真实扣费 charge(含历史 NULL),对应"筛选明细类型=消费 且 action=charge/NULL"求和
|
||||
# - total_hold : 预扣占用 hold
|
||||
total_charge: float = 0.0
|
||||
total_hold: float = 0.0
|
||||
# 回退类分解(仅 type=refund;真实退款 + 预扣释放 = total_refund)
|
||||
# - total_refund_real : 真实退款 refund(含历史 NULL)
|
||||
# - total_hold_release: 预扣释放 hold_release
|
||||
total_refund_real: float = 0.0
|
||||
total_hold_release: float = 0.0
|
||||
# 净消耗 = max(total_consume - total_refund, 0) = 实际"用掉了"的积分
|
||||
net_consume: float = 0.0
|
||||
transaction_count: int = 0
|
||||
generation_count: int = 0
|
||||
|
||||
Reference in New Issue
Block a user