diff --git a/platformapi/ebaiapi/shop_sku.go b/platformapi/ebaiapi/shop_sku.go index b6d9f923..82a63129 100644 --- a/platformapi/ebaiapi/shop_sku.go +++ b/platformapi/ebaiapi/shop_sku.go @@ -116,15 +116,18 @@ func (a *API) SkuCreate(shopID string, customSkuID int, params map[string]interf defParams := map[string]interface{}{ KeyShopID: shopID, "custom_sku_id": customSkuID, - "upc_type": UPCTypePrivate, - "brand_name": "无", // 很狗血的是,你还必须填个无才行。。。 } if params["upc"] == nil { - defParams["upc"] = "upc-" + utils.Int2Str(customSkuID) + defParams["upc_type"] = UPCTypePrivate + defParams["upc"] = "无" } if params["brand_id"] == nil { defParams["brand_id"] = 0 } + if params["brand_name"] == nil { + defParams["brand_name"] = "无" // 很狗血的是,你还必须填个无才行。。。 + } + result, err := a.AccessAPI("sku.create", utils.MergeMaps(params, defParams)) if err == nil { return utils.Str2Int64(utils.Interface2String(result.Data.(map[string]interface{})["sku_id"])), nil