This commit is contained in:
邹宗楠
2023-10-11 10:22:39 +08:00
parent 973a82476d
commit 595a2ee464
5 changed files with 10 additions and 6 deletions

View File

@@ -17,7 +17,6 @@ import (
// AddStoreSku 新增门店商品
func (a *API) AddStoreSku(param *request.AlibabaWdkSkuAddRequest) (*[]VegetableResultList, error) {
globals.SugarLogger.Debugf("=========AddStoreSku taboabo")
client := ability585.NewAbility585(&a.client)
data, _ := client.AlibabaWdkSkuAdd(param, a.token)
var foodList = make([]VegetableResultList, 0, len(*data.Result.Models))

View File

@@ -48,7 +48,7 @@ type ProductDetailParam struct {
// 商品ID抖店系统生成店铺下唯一长度19位。
ProductId string `json:"product_id"`
// 外部商家编码,商家自定义字段
//OutProductId string `json:"out_product_id"`
OutProductId string `json:"out_product_id"`
//// true读取草稿数据false读取线上数据不传默认为false
//ShowDraft string `json:"show_draft"`
}

View File

@@ -8,7 +8,6 @@ import (
)
var token = `{"access_token":"90283046-8f2b-46cf-90f1-e522b229e784","expires_in":1697080460,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ae493f0f-97d8-43ca-9b0e-727480add1fa","authority_id":""}`
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token)
// 查询售后单详情

View File

@@ -281,6 +281,9 @@ func (a *API) GetSkuDetail(productId, outProductId string) (*product_detail_resp
if productId != "" {
param.ProductId = productId
}
if outProductId != "" {
param.OutProductId = outProductId
}
result, err := request.Execute(a.accessTokenObj)
if err != nil {
@@ -691,8 +694,8 @@ func (a *API) CreateSubProduct(mainProductId int64, storeId int64) (int64, error
request.Param.StoreId = storeId
result, err := request.Execute(a.accessTokenObj)
globals.SugarLogger.Debugf("=========result := %s",utils.Format4Output(result,false))
globals.SugarLogger.Debugf("=========result := %s",utils.Format4Output(err,false))
globals.SugarLogger.Debugf("=========result := %s", utils.Format4Output(result, false))
globals.SugarLogger.Debugf("=========result := %s", utils.Format4Output(err, false))
if err != nil {
return 0, err
}

View File

@@ -55,7 +55,10 @@ func TestGetSkuDetail(t *testing.T) {
// 查询商品详情本地商品id
func TestGetSkuDetailLocalId(t *testing.T) {
data, err := a.GetSkuDetail("3592382914735826936", "")
var token = `{"access_token":"90283046-8f2b-46cf-90f1-e522b229e784","expires_in":1697080460,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ae493f0f-97d8-43ca-9b0e-727480add1fa","authority_id":""}`
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token)
data, err := a.GetSkuDetail("3592503538749683119", "")
fmt.Println(err)
globals.SugarLogger.Debugf("====%s", utils.Format4Output(data, false))
}