银豹增加商品部存在

This commit is contained in:
苏尹岚
2020-03-26 09:06:27 +08:00
parent 1fdd20d575
commit e8841976d8

View File

@@ -19,9 +19,10 @@ const (
url = "https://area27-win.pospal.cn:443/pospal-api2/openapi/v1"
statusSuccess = "success"
skuExistErrCode = "5004"
AppIDErrCode = "1034"
AppKeyErrCode = "1032"
skuExistErrCode = "5004"
skuNotExistErrCode = "5001"
AppIDErrCode = "1034"
AppKeyErrCode = "1032"
SkuStatusEnable = 1
SkuStatusDisabled = 0
@@ -169,6 +170,10 @@ func IsErrSkuExist(err error) (isExist bool) {
return utils.IsErrMatch(err, skuExistErrCode, []string{"商品已存在"})
}
func IsErrSkuNotExist(err error) (isExist bool) {
return utils.IsErrMatch(err, skuNotExistErrCode, []string{"商品不存在"})
}
//修改商品
//http://pospal.cn/openplatform/productapi.html#addProductInfo
func (a *API) UpdateProductInfo(productInfo *ProductInfo) (err error) {