fix(usage): 用户使用记录不下发账号计费倍率

- 将 usage log DTO 拆分为用户/管理员两类
- 用户接口不返回 account_rate_multiplier/ip_address/account
- 管理员接口保留管理员字段
- 补充契约测试防止回归
This commit is contained in:
墨颜
2026-01-19 17:05:42 +08:00
parent fbb572948d
commit 2f6f758670
8 changed files with 85 additions and 67 deletions

View File

@@ -163,7 +163,7 @@ func (h *UsageHandler) List(c *gin.Context) {
return
}
out := make([]dto.UsageLog, 0, len(records))
out := make([]dto.AdminUsageLog, 0, len(records))
for i := range records {
out = append(out, *dto.UsageLogFromServiceAdmin(&records[i]))
}