From 43c6791913945cd9c5a7b676eab2a1cb4db1e462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 25 Nov 2020 11:26:38 +0800 Subject: [PATCH] jds2 * --- platformapi/jdshopapi/store_page.go | 54 ++++++++++++------------ platformapi/jdshopapi/store_page_test.go | 14 +++--- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/platformapi/jdshopapi/store_page.go b/platformapi/jdshopapi/store_page.go index 0ae7a857..de536821 100644 --- a/platformapi/jdshopapi/store_page.go +++ b/platformapi/jdshopapi/store_page.go @@ -902,21 +902,21 @@ type WareSaveParam struct { StaffID int `json:"staffId"` UpdateTime interface{} `json:"updateTime"` } `json:"rentSpuVO"` - SaleAttrs []interface{} `json:"saleAttrs"` - Service string `json:"service"` - ServiceDesc string `json:"serviceDesc"` - ServiceFeeID int `json:"serviceFeeId"` - ShopCategorys []int `json:"shopCategorys"` - SkuJSON string `json:"skuJson"` - Skus []WareSaveSkus `json:"skus"` - TaxCheapContent string `json:"taxCheapContent"` - TaxCode string `json:"taxCode"` - TaxRate int `json:"taxRate"` - TempID string `json:"tempId"` - TemplateID int `json:"templateId"` - Title string `json:"title"` - ToUsePrice string `json:"toUsePrice"` - TransparentImageAudit []interface{} `json:"transparentImageAudit"` + SaleAttrs []interface{} `json:"saleAttrs"` + Service string `json:"service"` + ServiceDesc string `json:"serviceDesc"` + ServiceFeeID int `json:"serviceFeeId"` + ShopCategorys []int `json:"shopCategorys"` + SkuJSON string `json:"skuJson"` + Skus []*WareSaveSkus `json:"skus"` + TaxCheapContent string `json:"taxCheapContent"` + TaxCode string `json:"taxCode"` + TaxRate int `json:"taxRate"` + TempID string `json:"tempId"` + TemplateID int `json:"templateId"` + Title string `json:"title"` + ToUsePrice string `json:"toUsePrice"` + TransparentImageAudit []interface{} `json:"transparentImageAudit"` TransparentImageMap struct { } `json:"transparentImageMap"` TransportID int `json:"transportId"` @@ -947,18 +947,18 @@ type WareSaveSkusProp struct { } type WareSaveSkus struct { - Props []WareSaveSkusProp `json:"props"` - Features []interface{} `json:"features"` - SkuID int64 `json:"skuId,omitempty"` - JdPrice string `json:"jdPrice"` - OuterID string `json:"outerId"` - StockNum int `json:"stockNum"` - RentDeposit string `json:"rentDeposit"` - RentUnit string `json:"rentUnit"` - RentServiceDay string `json:"rentServiceDay"` - SkuProps []interface{} `json:"skuProps"` - Plu string `json:"plu"` - Capacity interface{} `json:"capacity"` + Props []*WareSaveSkusProp `json:"props"` + Features []interface{} `json:"features"` + SkuID int64 `json:"skuId,omitempty"` + JdPrice string `json:"jdPrice"` + OuterID string `json:"outerId"` + StockNum int `json:"stockNum"` + RentDeposit string `json:"rentDeposit"` + RentUnit string `json:"rentUnit"` + RentServiceDay string `json:"rentServiceDay"` + SkuProps []interface{} `json:"skuProps"` + Plu string `json:"plu"` + Capacity interface{} `json:"capacity"` } type WareSaveResult struct { diff --git a/platformapi/jdshopapi/store_page_test.go b/platformapi/jdshopapi/store_page_test.go index 94ca1707..f297eb42 100644 --- a/platformapi/jdshopapi/store_page_test.go +++ b/platformapi/jdshopapi/store_page_test.go @@ -218,24 +218,24 @@ func TestWareSave(t *testing.T) { Weight: "3", ShopCategorys: []int{15602360}, Notes: desc, - Skus: []WareSaveSkus{ - WareSaveSkus{ + Skus: []*WareSaveSkus{ + &WareSaveSkus{ SkuID: 10024685331653, JdPrice: "15", StockNum: 5, - Props: []WareSaveSkusProp{ - WareSaveSkusProp{ + Props: []*WareSaveSkusProp{ + &WareSaveSkusProp{ AttrID: 1000022043, AttrValues: 2515313135, AttrValueAlias: "250g", }, }, }, - WareSaveSkus{ + &WareSaveSkus{ JdPrice: "30", StockNum: 5, - Props: []WareSaveSkusProp{ - WareSaveSkusProp{ + Props: []*WareSaveSkusProp{ + &WareSaveSkusProp{ AttrID: 1000022043, AttrValues: 2515430634, AttrValueAlias: "500g",