feat(order): 展示上传联系电话并隔离用户端快照
This commit is contained in:
@@ -145,6 +145,7 @@ func applySellerListingPrice(item *ListingDTO) {
|
||||
if item.AssetSummary == nil {
|
||||
return
|
||||
}
|
||||
delete(item.AssetSummary, "import_meta")
|
||||
breakdown, ok := item.AssetSummary["price_breakdown"].(map[string]any)
|
||||
if !ok {
|
||||
return
|
||||
|
||||
@@ -291,6 +291,10 @@ func TestApplySellerListingPriceUsesSellerTotalPrice(t *testing.T) {
|
||||
item := &ListingDTO{
|
||||
PriceCent: 23800,
|
||||
AssetSummary: map[string]any{
|
||||
"import_meta": map[string]any{
|
||||
"uploader_name": "客服1",
|
||||
"contact_phone": "15196354603",
|
||||
},
|
||||
"price_breakdown": map[string]any{
|
||||
"seller_total_price": 200,
|
||||
},
|
||||
@@ -302,6 +306,9 @@ func TestApplySellerListingPriceUsesSellerTotalPrice(t *testing.T) {
|
||||
if item.PriceCent != 20000 {
|
||||
t.Fatalf("expected seller price 20000, got %d", item.PriceCent)
|
||||
}
|
||||
if _, ok := item.AssetSummary["import_meta"]; ok {
|
||||
t.Fatal("expected import_meta hidden from seller listing")
|
||||
}
|
||||
}
|
||||
|
||||
func TestApplySellerListingPriceKeepsFallbackPrice(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user