1
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
// 查询售后单详情
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user