增加渠道上传预统计

This commit is contained in:
yml2213
2026-07-25 14:34:03 +08:00
parent 1ea01f7d46
commit 7ca68e6b8b
15 changed files with 689 additions and 63 deletions
@@ -18,6 +18,7 @@ type listingRow struct {
Title string
OwnerPhone string
OwnerNickname string
SourceChannel string `gorm:"column:source_channel"`
Description string
GameName string
ServerRegion string
@@ -63,14 +64,20 @@ func sellerListings(items []ListingDTO) []ListingDTO {
}
func applyPublicListingURLs(item *ListingDTO) {
item.SourceChannel = ""
item.ScreenshotURLS = publicScreenshotURLs(item.ID, item.ScreenshotURLS, item.Status, item.ReviewStatus)
if item.AssetSummary != nil {
delete(item.AssetSummary, "import_meta")
delete(item.AssetSummary, "price_breakdown")
}
}
func applySellerListingPrice(item *ListingDTO) {
if item == nil || item.AssetSummary == nil {
if item == nil {
return
}
item.SourceChannel = ""
if item.AssetSummary == nil {
return
}
breakdown, ok := item.AssetSummary["price_breakdown"].(map[string]any)
@@ -103,6 +110,7 @@ func (row listingRow) toDTO() ListingDTO {
OwnerID: row.OwnerID,
OwnerPhone: row.OwnerPhone,
OwnerNickname: row.OwnerNickname,
SourceChannel: row.SourceChannel,
Title: row.Title,
Description: row.Description,
GameName: row.GameName,