修复待处理换货资产归属
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m53s

This commit is contained in:
2026-09-24 12:30:33 +08:00
parent 390769ab7a
commit b09275a0d0
7 changed files with 142 additions and 2 deletions

View File

@@ -519,7 +519,12 @@ func (s *Service) GetPending(ctx context.Context, identifier string) (*dto.Clien
return nil, err
}
if !s.customerOwnsAsset(ctx, asset) {
customerID := middleware.GetCustomerIDFromContext(ctx)
owned, err := s.customerBinding.OwnsAsset(ctx, customerID, asset.AssetType, asset.AssetID)
if err != nil {
return nil, err
}
if !owned {
return nil, errors.New(errors.CodeAssetNotFound)
}