chore: address pull request review issues

This commit is contained in:
2026-04-13 14:21:22 +02:00
parent 2e61cde742
commit 38cb07f3d4
12 changed files with 74 additions and 184 deletions

View File

@@ -23,12 +23,6 @@ func (s *SpecificPriceService) Create(ctx context.Context, pr *model.SpecificPri
return nil, err
}
if pr.Scope == "shop" && len(pr.ProductIDs) == 0 && len(pr.CategoryIDs) == 0 && len(pr.ProductAttributeIDs) == 0 && len(pr.CountryIDs) == 0 && len(pr.CustomerIDs) == 0 {
// pr.Scope = "global"
} else {
// pr.Scope = "scoped"
}
if err := s.specificPriceRepo.Create(ctx, pr); err != nil {
return nil, err
}
@@ -51,12 +45,6 @@ func (s *SpecificPriceService) Update(ctx context.Context, id uint64, pr *model.
pr.ID = id
if pr.Scope == "shop" && len(pr.ProductIDs) == 0 && len(pr.CategoryIDs) == 0 && len(pr.ProductAttributeIDs) == 0 && len(pr.CountryIDs) == 0 && len(pr.CustomerIDs) == 0 {
// pr.Scope = "global"
} else {
// pr.Scope = "scoped"
}
if err := s.specificPriceRepo.Update(ctx, pr); err != nil {
return nil, err
}