美团新apisku销售属性

This commit is contained in:
苏尹岚
2020-06-12 16:18:38 +08:00
parent 4a62418fb5
commit 25dedce4f4
4 changed files with 76 additions and 23 deletions

View File

@@ -182,7 +182,7 @@ type UpdateSkusParamSkus struct {
Capacity string `json:"capacity,omitempty"` //否 20L 容量在有特殊要求的类目下必填最多支持6位小数。
Type string `json:"type"` //"com.jd.pop.ware.ic.api.domain.sku"
Type2 string `json:"@type"`
MultiCateProps []*CreateSkuParamAttrs `json:"multiCateProps"` // 否 无 类目属性列表,类目属性中有必填项时,此字段必填;若未设置或设置错误,会有“通用属性必填”等错误提示!
MultiCateProps []*CreateSkuParamAttrs `json:"multiCateProps,omitempty"` // 否 无 类目属性列表,类目属性中有必填项时,此字段必填;若未设置或设置错误,会有“通用属性必填”等错误提示!
}
//查询商家所有的店内分类

View File

@@ -328,31 +328,17 @@ func TestSearchWare4Valid(t *testing.T) {
func TestUpdateSkus(t *testing.T) {
_, err := api.UpdateSkus(&UpdateSkusParam{
WareID: 14537944716,
WareID: 14600091031,
Skus: []*UpdateSkusParamSkus{
&UpdateSkusParamSkus{
WareID: 14537944716,
JdPrice: 1.5,
StockNum: "99",
OuterID: "11",
WareID: 14600091031,
SkuID: 70357447332,
JdPrice: 7.5,
StockNum: "9999",
SaleAttrs: []*CreateSkuParamAttrs{
&CreateSkuParamAttrs{
AttrID: "1001027602",
AttrValues: []string{"2440977935"},
},
},
Type: "com.jd.pop.ware.ic.api.domain.sku",
Type2: "com.jd.pop.ware.ic.api.domain.Sku",
},
&UpdateSkusParamSkus{
WareID: 14537944716,
JdPrice: 1.8,
StockNum: "99",
OuterID: "123",
SaleAttrs: []*CreateSkuParamAttrs{
&CreateSkuParamAttrs{
AttrID: "1001027602",
AttrValues: []string{"2441761921"},
AttrValues: []string{"2441658643"},
},
},
Type: "com.jd.pop.ware.ic.api.domain.sku",
@@ -436,10 +422,10 @@ func TestTransparentImageAdd(t *testing.T) {
func TestUpdateWareSaleAttrvalueAlias(t *testing.T) {
err := api.UpdateWareSaleAttrvalueAlias(&UpdateWareSaleAttrvalueAliasParam{
WareID: 14566414324,
WareID: 14565234929,
Props: []*CreateSkuParamAttrs2{
&CreateSkuParamAttrs2{
AttrID: "1001038262",
AttrID: "1000021981",
AttrValues: []string{"2453826609"},
AttrValueAlias: []string{"500g 下午易缺货"},
Type: "com.jd.pop.ware.ic.api.domain.prop",