Files
hfb_sys/backend/internal/modules/listing/service_query.go
T
yml2213 96bc6a4db6 fix(distribution): 货架加价打通前台、下单与卖方分成
分站公开列表和详情展示当前货架加价;下单写入 base_price / shelf_markup / markup_site_id 快照并计入实付。
支付分账改用快照加价,不再误用 PlatformFeeCent;结账不退加价,事后改价不影响历史订单。
2026-09-08 17:07:17 +08:00

48 lines
1.3 KiB
Go

package listing
import (
"context"
)
func (s *Service) ListPublic(ctx context.Context, query PublicListQuery) (*PublicListResult, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.ListPublic(ctx, query)
}
func (s *Service) ListMine(ctx context.Context, ownerID uint64, siteCode ...string) ([]ListingDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.ListMine(ctx, ownerID, siteCode...)
}
func (s *Service) FindPublic(ctx context.Context, id uint64, siteCode string) (*ListingDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.FindPublic(ctx, id, siteCode)
}
func (s *Service) FindPublicCoverKey(ctx context.Context, id uint64) (string, error) {
if s.repo == nil {
return "", ErrDependencyUnavailable
}
return s.repo.FindPublicCoverKey(ctx, id)
}
func (s *Service) FindPublicScreenshotKey(ctx context.Context, id uint64, index int) (string, error) {
if s.repo == nil {
return "", ErrDependencyUnavailable
}
return s.repo.FindPublicScreenshotKey(ctx, id, index)
}
func (s *Service) FindMine(ctx context.Context, ownerID uint64, id uint64) (*ListingDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.FindMine(ctx, ownerID, id)
}