饿百创建商品参数修改

This commit is contained in:
苏尹岚
2020-02-11 11:39:33 +08:00
parent 29d85fe970
commit 46ede7c9c5

View File

@@ -292,14 +292,14 @@ func (a *API) SkuList(shopID string, params *SkuListParams) (skuInfo *PageDataIn
}
// 饿百商品名可以相同,不会报错
func (a *API) SkuCreate(trackInfo, shopID string, customSkuID int, params map[string]interface{}) (skuID int64, err error) {
func (a *API) SkuCreate(trackInfo, shopID string, customSkuID int64, params map[string]interface{}) (skuID int64, err error) {
defParams := map[string]interface{}{
KeyShopID: shopID,
KeyCustomSkuID: customSkuID,
}
if params["upc"] == nil {
defParams["upc_type"] = UPCTypePrivate
defParams["upc"] = "upc-" + utils.Int2Str(customSkuID)
defParams["upc"] = "upc-" + utils.Int2Str(int(customSkuID))
}
if params["brand_id"] == nil {
defParams["brand_id"] = 0