From 37c792a0670d7c7413cf4bc375ff07d185cac6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 23 Mar 2020 17:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E8=B1=B9=E4=BF=AE=E6=94=B9=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/yinbaoapi/yinbaoapi.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/platformapi/yinbaoapi/yinbaoapi.go b/platformapi/yinbaoapi/yinbaoapi.go index f90ac0da..0d8d737c 100644 --- a/platformapi/yinbaoapi/yinbaoapi.go +++ b/platformapi/yinbaoapi/yinbaoapi.go @@ -167,27 +167,27 @@ func IsErrSkuExist(err error) (isExist bool) { //修改商品 //http://pospal.cn/openplatform/productapi.html#addProductInfo -func (a *API) UpdateProductInfo(productInfoParam *ProductInfoParam) (err error) { +func (a *API) UpdateProductInfo(productInfo *ProductInfo) (err error) { mapP := map[string]interface{}{ - "uid": productInfoParam.ProductInfo.UID, + "uid": productInfo.UID, } - if productInfoParam.ProductInfo.BuyPrice != nil { - mapP["buyPrice"] = productInfoParam.ProductInfo.BuyPrice + if productInfo.BuyPrice != nil { + mapP["buyPrice"] = productInfo.BuyPrice } - if productInfoParam.ProductInfo.SellPrice != nil { - mapP["sellPrice"] = productInfoParam.ProductInfo.SellPrice + if productInfo.SellPrice != nil { + mapP["sellPrice"] = productInfo.SellPrice } - if productInfoParam.ProductInfo.Stock != nil { - mapP["stock"] = productInfoParam.ProductInfo.Stock + if productInfo.Stock != nil { + mapP["stock"] = productInfo.Stock } - if productInfoParam.ProductInfo.Enable != nil { - mapP["enable"] = productInfoParam.ProductInfo.Enable + if productInfo.Enable != nil { + mapP["enable"] = productInfo.Enable } - if productInfoParam.ProductInfo.IsCustomerDiscount != nil { - mapP["isCustomerDiscount"] = productInfoParam.ProductInfo.IsCustomerDiscount + if productInfo.IsCustomerDiscount != nil { + mapP["isCustomerDiscount"] = productInfo.IsCustomerDiscount } - if productInfoParam.ProductInfo.CustomerPrice != nil { - mapP["customerPrice"] = productInfoParam.ProductInfo.CustomerPrice + if productInfo.CustomerPrice != nil { + mapP["customerPrice"] = productInfo.CustomerPrice } a.AccessAPI("productOpenApi/updateProductInfo", map[string]interface{}{ "productInfo": mapP,