feat(distribution): 完善分销收号资产双视图、商户提现、自主加价、品牌装修与数据大盘

This commit is contained in:
yml2213
2026-09-08 16:05:30 +08:00
parent fd4e490ed3
commit 2c4e87475a
19 changed files with 3145 additions and 108 deletions
@@ -239,4 +239,68 @@ func (s *Service) GetPublicSiteInfo(ctx context.Context, code, domain string) (*
return s.repo.GetPublicSiteInfo(ctx, code, domain)
}
func (s *Service) UpdateSiteBranding(ctx context.Context, adminID, siteID uint64, req UpdateSiteBrandingRequest) (*SiteDTO, error) {
if err := s.available(); err != nil {
return nil, err
}
return s.repo.UpdateSiteBranding(ctx, adminID, siteID, req)
}
func (s *Service) UpdateAccountMarkup(ctx context.Context, adminID, id uint64, markupCent int64) (*AccountDisplayDTO, error) {
if err := s.available(); err != nil {
return nil, err
}
return s.repo.UpdateAccountMarkup(ctx, adminID, id, markupCent)
}
func (s *Service) BatchUpdateAccountMarkup(ctx context.Context, adminID, siteID uint64, req BatchUpdateAccountMarkupRequest) error {
if err := s.available(); err != nil {
return err
}
return s.repo.BatchUpdateAccountMarkup(ctx, adminID, siteID, req)
}
func (s *Service) ListReceivedListings(ctx context.Context, adminID, siteID uint64, q ReceivedListingQuery) (*ReceivedListingPage, error) {
if err := s.available(); err != nil {
return nil, err
}
return s.repo.ListReceivedListings(ctx, adminID, siteID, q)
}
func (s *Service) UpdateReceivedListingStatus(ctx context.Context, adminID, listingID uint64, status string) error {
if err := s.available(); err != nil {
return err
}
return s.repo.UpdateReceivedListingStatus(ctx, adminID, listingID, status)
}
func (s *Service) GetSiteWallet(ctx context.Context, adminID, siteID uint64) (*SiteWalletDTO, error) {
if err := s.available(); err != nil {
return nil, err
}
return s.repo.GetSiteWallet(ctx, adminID, siteID)
}
func (s *Service) ApplySiteWithdrawal(ctx context.Context, adminID, siteID uint64, req ApplySiteWithdrawalRequest) (*SiteWithdrawalDTO, error) {
if err := s.available(); err != nil {
return nil, err
}
return s.repo.ApplySiteWithdrawal(ctx, adminID, siteID, req)
}
func (s *Service) ListSiteWithdrawals(ctx context.Context, adminID, siteID uint64, page, size int) (*SiteWithdrawalPage, error) {
if err := s.available(); err != nil {
return nil, err
}
return s.repo.ListSiteWithdrawals(ctx, adminID, siteID, page, size)
}
func (s *Service) GetDashboardAnalytics(ctx context.Context, adminID, siteID uint64) (*DistributionAnalyticsDTO, error) {
if err := s.available(); err != nil {
return nil, err
}
return s.repo.GetDashboardAnalytics(ctx, adminID, siteID)
}