feat(distribution): 支持分销上传来源追踪、主站审核展示与收售结算模式自动判定
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
)
|
||||
|
||||
func (s *Service) Create(ctx context.Context, ownerID uint64, req CreateRequest) (*ListingDTO, error) {
|
||||
func (s *Service) Create(ctx context.Context, ownerID uint64, req CreateRequest, siteCode ...string) (*ListingDTO, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
@@ -29,7 +29,11 @@ func (s *Service) Create(ctx context.Context, ownerID uint64, req CreateRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.repo.Create(ctx, ownerID, req, reviewRequired, cooldown)
|
||||
effectiveSiteCode := ""
|
||||
if len(siteCode) > 0 {
|
||||
effectiveSiteCode = siteCode[0]
|
||||
}
|
||||
return s.repo.Create(ctx, ownerID, req, reviewRequired, cooldown, effectiveSiteCode)
|
||||
}
|
||||
|
||||
func (s *Service) Update(ctx context.Context, ownerID uint64, id uint64, req UpdateRequest) (*ListingDTO, error) {
|
||||
|
||||
Reference in New Issue
Block a user