Merge branch 'master' of e.coding.net:rosydev/baseapi
This commit is contained in:
@@ -13,10 +13,10 @@ import (
|
|||||||
|
|
||||||
// 测试添加分类
|
// 测试添加分类
|
||||||
func TestRetailCatUpdate(t *testing.T) {
|
func TestRetailCatUpdate(t *testing.T) {
|
||||||
err := api.RetailCatUpdate("12663480", "测试2底料", &Param4UpdateCat{
|
err := api.RetailCatUpdate("17250949", "火腿罐头", &Param4UpdateCat{
|
||||||
CategoryNameOrigin: "",
|
CategoryNameOrigin: "",
|
||||||
CategoryCodeOrigin: "",
|
CategoryCodeOrigin: "",
|
||||||
CategoryCode: "45",
|
CategoryCode: "",
|
||||||
Sequence: 0,
|
Sequence: 0,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability2770/request"
|
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability2770/request"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability2770/response"
|
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability2770/response"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util"
|
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -334,6 +336,7 @@ func (ability *Ability2770) AlibabaRetailMarketingItemdiscountActivityCreate(req
|
|||||||
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
if respStruct.Body == "" || len(respStruct.Body) == 0 {
|
||||||
respStruct.Body = jsonStr
|
respStruct.Body = jsonStr
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("AlibabaRetailMarketingItemdiscountActivityCreate respStruct=%s", utils.Format4Output(respStruct, false))
|
||||||
return &respStruct, err
|
return &respStruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ type AlibabaRetailMarketingItemdiscountActivityCreateItemDiscountActivityOperate
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
活动创建者name */
|
活动创建者name */
|
||||||
CreatorName *string `json:"creatdeor_name,omitempty" `
|
CreatorName *string `json:"creator_name,omitempty" `
|
||||||
|
|
||||||
/*
|
/*
|
||||||
活动描述 */
|
活动描述 */
|
||||||
|
|||||||
@@ -25,13 +25,14 @@ func (a *API) ActivityCreate(param domain.AlibabaRetailMarketingItemdiscountActi
|
|||||||
resp, err := act.AlibabaRetailMarketingItemdiscountActivityCreate(&request.AlibabaRetailMarketingItemdiscountActivityCreateRequest{
|
resp, err := act.AlibabaRetailMarketingItemdiscountActivityCreate(&request.AlibabaRetailMarketingItemdiscountActivityCreateRequest{
|
||||||
Param: ¶m,
|
Param: ¶m,
|
||||||
}, a.token)
|
}, a.token)
|
||||||
globals.SugarLogger.Debugf("ActivityCreate:requestId:" + resp.RequestId + "msg:" + *resp.Result.ErrorMessage)
|
globals.SugarLogger.Debugf("ActivityCreate:resp %s", utils.Format4Output(&resp, false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
if resp.Result.ErrorMessage != nil {
|
if resp.Result.ErrorMessage != nil {
|
||||||
return 0, fmt.Errorf("ActivityCreate:requestId:" + resp.RequestId + "msg:" + *resp.Result.ErrorMessage)
|
return 0, fmt.Errorf("ActivityCreate:requestId:" + resp.RequestId + "msg:" + *resp.Result.ErrorMessage)
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("ActivityCreate actID=%d", utils.Pointer2Int64(resp.Result.Data))
|
||||||
return utils.Pointer2Int64(resp.Result.Data), nil
|
return utils.Pointer2Int64(resp.Result.Data), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,11 +44,12 @@ type skuAct struct {
|
|||||||
// ActivitySkuCreate 特价活动新增商品 1-2
|
// ActivitySkuCreate 特价活动新增商品 1-2
|
||||||
func (a *API) ActivitySkuCreate(param domain.AlibabaRetailMarketingItemdiscountActivitySkuAddItemDiscountActivityElementOperateRequest) (error, *skuAct, []string) {
|
func (a *API) ActivitySkuCreate(param domain.AlibabaRetailMarketingItemdiscountActivitySkuAddItemDiscountActivityElementOperateRequest) (error, *skuAct, []string) {
|
||||||
act := ability2770.NewAbility2770(&a.client)
|
act := ability2770.NewAbility2770(&a.client)
|
||||||
|
globals.SugarLogger.Debugf("ActivitySkuCreate a=%s", utils.Format4Output(a, false))
|
||||||
globals.SugarLogger.Debugf("ActivitySkuCreate req=%s", utils.Format4Output(param, false))
|
globals.SugarLogger.Debugf("ActivitySkuCreate req=%s", utils.Format4Output(param, false))
|
||||||
resp, err := act.AlibabaRetailMarketingItemdiscountActivitySkuAdd(&request.AlibabaRetailMarketingItemdiscountActivitySkuAddRequest{
|
resp, err := act.AlibabaRetailMarketingItemdiscountActivitySkuAdd(&request.AlibabaRetailMarketingItemdiscountActivitySkuAddRequest{
|
||||||
Param: ¶m,
|
Param: ¶m,
|
||||||
}, a.token)
|
}, a.token)
|
||||||
globals.SugarLogger.Debugf("ActivitySkuCreate:requestId:" + resp.RequestId + "msg:" + *resp.Result.ErrorMessage)
|
globals.SugarLogger.Debugf("ActivitySkuCreate:resp %s", utils.Format4Output(&resp, false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err, nil, *resp.Result.FailedSkuCodes
|
return err, nil, *resp.Result.FailedSkuCodes
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user