feat: 接入旧站管理端并完整迁移后台能力

This commit is contained in:
yml
2026-11-12 22:03:01 +08:00
parent e5f923706b
commit a4441bba9a
509 changed files with 140714 additions and 1068 deletions
@@ -17,6 +17,7 @@ type listingRow struct {
Title string
OwnerPhone string
OwnerNickname string
OwnerIsQualityOwner bool `gorm:"column:owner_is_quality_owner"`
DisplaySourceChannel string `gorm:"column:display_source_channel"`
IsExternalUpload bool `gorm:"column:is_external_upload"`
DistributionSiteCode string `gorm:"column:distribution_site_code"`
@@ -225,6 +226,7 @@ func (row listingRow) toDTO() ListingDTO {
OwnerID: row.OwnerID,
OwnerPhone: row.OwnerPhone,
OwnerNickname: row.OwnerNickname,
OwnerIsQualityOwner: row.OwnerIsQualityOwner,
SourceChannel: row.DisplaySourceChannel,
IsExternalUpload: row.IsExternalUpload,
Title: row.Title,
@@ -249,6 +251,9 @@ func (row listingRow) toDTO() ListingDTO {
DistributionSiteID: row.DistributionSiteID,
DistributionSiteCode: row.DistributionSiteCode,
DistributionSiteName: row.DistributionSiteName,
IsPremium: row.IsPremium,
CompensationPlan: normalizedCompensationPlan(row.CompensationPlan),
InsuranceFeeBps: row.InsuranceFeeBps,
ReviewReason: reviewReason,
PublishedAt: row.PublishedAt,
CreatedAt: row.CreatedAt,
@@ -285,6 +290,9 @@ func toDTO(account model.GameAccount, listing model.RentalListing) *ListingDTO {
SettlementMode: listing.SettlementMode,
ManagedAdminID: listing.ManagedAdminID,
DistributionSiteID: listing.DistributionSiteID,
IsPremium: listing.IsPremium,
CompensationPlan: normalizedCompensationPlan(listing.CompensationPlan),
InsuranceFeeBps: listing.InsuranceFeeBps,
ReviewReason: reviewReason,
PublishedAt: listing.PublishedAt,
CreatedAt: listing.CreatedAt,
@@ -292,6 +300,13 @@ func toDTO(account model.GameAccount, listing model.RentalListing) *ListingDTO {
}
}
func normalizedCompensationPlan(plan string) string {
if plan == CompensationPlanInsurance {
return CompensationPlanInsurance
}
return CompensationPlanNormal
}
func normalizedReviewState(status string, reviewStatus string, reviewReason string) (string, string) {
if status == "offline" {
return "none", reviewReason