Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions service/task_billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ func RefundTaskQuota(ctx context.Context, task *model.Task, reason string) {
taskAdjustTokenQuota(ctx, task, -quota)

//3. 更新用户和渠道的使用额度
model.UpdateUserUsedQuotaAndRequestCount(task.UserId, -quota)
model.UpdateChannelUsedQuota(task.ChannelId, -quota)
//model.UpdateUserUsedQuotaAndRequestCount(task.UserId, -quota)
//model.UpdateChannelUsedQuota(task.ChannelId, -quota)

// 4. 记录日志
other := taskBillingOther(task)
Expand Down Expand Up @@ -230,8 +230,8 @@ func RecalculateTaskQuota(ctx context.Context, task *model.Task, actualQuota int
} else {
logType = model.LogTypeRefund
logQuota = -quotaDelta
model.UpdateUserUsedQuotaAndRequestCount(task.UserId, -quotaDelta)
model.UpdateChannelUsedQuota(task.ChannelId, -quotaDelta)
//model.UpdateUserUsedQuotaAndRequestCount(task.UserId, -quotaDelta)
//model.UpdateChannelUsedQuota(task.ChannelId, -quotaDelta)
}
other := taskBillingOther(task)
other["task_id"] = task.TaskID
Expand Down