feat(quality-owner): 增加优质号主、极品专区与无忧租号保险

- 支持保证金余额支付、在线支付开通及后台手动设置审计
- 新增极品专区发布权限、赔付方案与保险结算费率快照
- 优化首页、商品卡和个人中心的优质号主身份展示
This commit is contained in:
yml2213
2026-11-04 15:04:35 +08:00
parent 812e95e7d1
commit 98174c0e33
90 changed files with 3478 additions and 64 deletions
@@ -18,6 +18,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"`
@@ -171,6 +172,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,
@@ -195,6 +197,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,
@@ -231,6 +236,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,
@@ -238,6 +246,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