feat: align ids to int64

This commit is contained in:
2026-01-08 09:57:04 +08:00
parent a1de16bc01
commit d98f41f1ac
39 changed files with 298 additions and 339 deletions

View File

@@ -156,7 +156,7 @@ func (s *super) ListTenants(ctx context.Context, filter *super_dto.TenantListFil
}
func (s *super) CreateTenant(ctx context.Context, form *super_dto.TenantCreateForm) error {
uid := cast.ToInt64(form.AdminUserID)
uid := form.AdminUserID
if _, err := models.UserQuery.WithContext(ctx).Where(models.UserQuery.ID.Eq(uid)).First(); err != nil {
return errorx.ErrRecordNotFound.WithMsg("用户不存在")
}
@@ -331,7 +331,7 @@ func (s *super) ApproveWithdrawal(ctx context.Context, id int64) error {
UpdatedAt: time.Now(),
})
if err == nil && Audit != nil {
Audit.Log(ctx, "approve_withdrawal", cast.ToString(id), "Approved withdrawal")
Audit.Log(ctx, 0, "approve_withdrawal", cast.ToString(id), "Approved withdrawal")
}
return err
}
@@ -381,7 +381,7 @@ func (s *super) RejectWithdrawal(ctx context.Context, id int64, reason string) e
})
if err == nil && Audit != nil {
Audit.Log(ctx, "reject_withdrawal", cast.ToString(id), "Rejected: "+reason)
Audit.Log(ctx, 0, "reject_withdrawal", cast.ToString(id), "Rejected: "+reason)
}
return err
}