修复账号没了找不到email

This commit is contained in:
2026-07-06 18:36:11 +08:00
parent d3a479ed76
commit 10c312eb09
5 changed files with 29 additions and 19 deletions
+2 -2
View File
@@ -600,11 +600,11 @@ func (r *EventRepository) MarkRefunded(ctx context.Context, eventID string) (boo
// SetAccount stamps which provider account is fulfilling an in-flight event.
// Called when generation commits to a token, so the accounts view can count
// pending events per account and an abandoned-event purge can attribute back.
func (r *EventRepository) SetAccount(ctx context.Context, eventID, accountID string) error {
func (r *EventRepository) SetAccount(ctx context.Context, eventID, accountID, accountEmail string) error {
return r.db.WithContext(ctx).
Model(&model.EventLog{}).
Where("id = ?", eventID).
Update("account_id", accountID).Error
Updates(map[string]any{"account_id": accountID, "account_email": accountEmail}).Error
}
// InFlightByAccount counts pending (in-flight) events grouped by account_id, for