fix: 恢复腾讯云账单同步并完善成本预测

- 接入腾讯云单日账单、全局限频和指数退避

- 修正月末费用预测并增加账期提示和费用归因

- 补充腾讯云限频及账单归因回归测试
This commit is contained in:
Logan.Li committed 2026-07-29 05:44:40 +08:00
1 parent 88c41f0b2b
commit dd3770a66c
15 files changed
+610 -17

No files matched your search

+4 -1
View File
@@ -37,6 +37,9 @@ func SyncDate(db *gorm.DB, billingDate string, accountID *uint) Result {
q := db.Where("status = ?", "active")
if accountID != nil {
q = q.Where("id = ?", *accountID)
} else {
// 批量同步只选择已接入账单 API 的厂商,避免无效失败。 // Logan.Li
q = q.Where("provider IN ?", cloud.SupportedBillingProviders)
}
q.Find(&accounts)
result.Accounts = len(accounts)
@@ -138,4 +141,4 @@ func syncAccount(db *gorm.DB, account model.CloudAccount, billingDate string) (c
db.Model(&account).Update("monthly_cost", monthCost)
return created, updated, skipped, nil
}
}