实现外部商品调价
This commit is contained in:
@@ -15,18 +15,19 @@ import (
|
||||
|
||||
type listingRow struct {
|
||||
model.RentalListing
|
||||
Title string
|
||||
OwnerPhone string
|
||||
OwnerNickname string
|
||||
SourceChannel string `gorm:"column:source_channel"`
|
||||
Description string
|
||||
GameName string
|
||||
ServerRegion string
|
||||
LoginPlatform string
|
||||
RankLevel string
|
||||
HafCoinAmount int64
|
||||
AssetSummary datatypes.JSON `gorm:"column:asset_summary"`
|
||||
ScreenshotURLS datatypes.JSON `gorm:"column:screenshot_urls"`
|
||||
Title string
|
||||
OwnerPhone string
|
||||
OwnerNickname string
|
||||
SourceChannel string `gorm:"column:source_channel"`
|
||||
IsExternalUpload bool `gorm:"column:is_external_upload"`
|
||||
Description string
|
||||
GameName string
|
||||
ServerRegion string
|
||||
LoginPlatform string
|
||||
RankLevel string
|
||||
HafCoinAmount int64
|
||||
AssetSummary datatypes.JSON `gorm:"column:asset_summary"`
|
||||
ScreenshotURLS datatypes.JSON `gorm:"column:screenshot_urls"`
|
||||
}
|
||||
|
||||
func rowsToDTO(rows []listingRow) []ListingDTO {
|
||||
@@ -65,6 +66,7 @@ func sellerListings(items []ListingDTO) []ListingDTO {
|
||||
|
||||
func applyPublicListingURLs(item *ListingDTO) {
|
||||
item.SourceChannel = ""
|
||||
item.IsExternalUpload = false
|
||||
item.ScreenshotURLS = publicScreenshotURLs(item.ID, item.ScreenshotURLS, item.Status, item.ReviewStatus)
|
||||
if item.AssetSummary != nil {
|
||||
delete(item.AssetSummary, "import_meta")
|
||||
@@ -77,6 +79,7 @@ func applySellerListingPrice(item *ListingDTO) {
|
||||
return
|
||||
}
|
||||
item.SourceChannel = ""
|
||||
item.IsExternalUpload = false
|
||||
if item.AssetSummary == nil {
|
||||
return
|
||||
}
|
||||
@@ -111,6 +114,7 @@ func (row listingRow) toDTO() ListingDTO {
|
||||
OwnerPhone: row.OwnerPhone,
|
||||
OwnerNickname: row.OwnerNickname,
|
||||
SourceChannel: row.SourceChannel,
|
||||
IsExternalUpload: row.IsExternalUpload,
|
||||
Title: row.Title,
|
||||
Description: row.Description,
|
||||
GameName: row.GameName,
|
||||
|
||||
Reference in New Issue
Block a user