refactor(listing): 卖家发布定价改用整数分与基点
This commit is contained in:
@@ -1106,11 +1106,11 @@ func TestCreateDistributionListingUsesMainSiteReceiveRatio(t *testing.T) {
|
||||
if pricing.SellerRatio != 43 {
|
||||
t.Fatalf("distribution receive seller_ratio = %v, want 43 from main-site ratio_config", pricing.SellerRatio)
|
||||
}
|
||||
if pricing.SellerTotalPriceCent != 23260 {
|
||||
t.Fatalf("seller_total_price_cent = %d, want 23260", pricing.SellerTotalPriceCent)
|
||||
if pricing.SellerTotalPriceCent != 23255 {
|
||||
t.Fatalf("seller_total_price_cent = %d, want 23255", pricing.SellerTotalPriceCent)
|
||||
}
|
||||
if dto.PriceCent != 26320 {
|
||||
t.Fatalf("listing PriceCent = %d, want 26320 from main-site sale price", dto.PriceCent)
|
||||
if dto.PriceCent != 26315 {
|
||||
t.Fatalf("listing PriceCent = %d, want 26315 from main-site sale price", dto.PriceCent)
|
||||
}
|
||||
if dto.DistributionSiteCode != "dist_ratio_1" {
|
||||
t.Fatalf("DistributionSiteCode = %s, want dist_ratio_1", dto.DistributionSiteCode)
|
||||
@@ -1173,8 +1173,8 @@ func TestCreateDistributionListingAppliesSiteReceiveCostDelta(t *testing.T) {
|
||||
if pricing.SellerRatio != 46 {
|
||||
t.Fatalf("seller_ratio = %v, want 46 after site cost delta 3 (R=43+3) under decoupled model", pricing.SellerRatio)
|
||||
}
|
||||
if dto.PriceCent != 26320 {
|
||||
t.Fatalf("listing PriceCent = %d, want 26320 (buyer price stays anchored to main-site R)", dto.PriceCent)
|
||||
if dto.PriceCent != 26315 {
|
||||
t.Fatalf("listing PriceCent = %d, want 26315 (buyer price stays anchored to main-site R)", dto.PriceCent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user