This commit is contained in:
邹宗楠
2022-12-29 09:53:40 +08:00
parent 541aab34fa
commit dbaec5faed
3 changed files with 6 additions and 4 deletions

View File

@@ -25,13 +25,13 @@ func init() {
// sandbox
// api = New("594ab45a-9a73-4a43-82b0-a64cbd55d883", "06692746f7224695ad4788ce340bc854", "d6b42a35a7414a5490d811654d745c84")
// prod
api = New("73e2e9f6-b21e-4dcd-8c92-71e4e100b07e", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4")
// api = New("73e2e9f6-b21e-4dcd-8c92-71e4e100b07e", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4")
// 天天果园
//api = New("c45e6510-00ba-4be2-977e-bcb9c9792cc7", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26")
// 京东果园
//api = New("b1138139-9610-4b80-9a63-a63da4773885", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26")
// 果切
//api = New("0e12f461-2e6b-49ca-bce6-935c6672362d", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec")
api = New("0e12f461-2e6b-49ca-bce6-935c6672362d", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec")
//prod zs
// api = New("6f8d3290-0120-4ad7-8b53-943c67c84f3f", "789279b9ae814ba091ac52815566b54d", "5d668cd227644637bb0fd73ed8118ec8")

View File

@@ -2,6 +2,7 @@ package jdapi
import (
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"regexp"
"strings"
@@ -394,6 +395,7 @@ func (a *API) AddSku(outSkuId string, cagtegoryId int, shopCategories []int64, b
KeyFixedStatus: fixedStatus,
KeyIsSale: isSale,
}
globals.SugarLogger.Debugf("===============AddSku= %s", utils.Format4Output(fixedParams, false))
result, err := a.AccessAPINoPage("pms/sku/addSku", utils.MergeMaps(fixedParams, addParams), nil, nil, nil)
if err == nil {
return (result.(map[string]interface{}))["skuId"].(string), nil

View File

@@ -58,9 +58,9 @@ func TestDelVipPrice(t *testing.T) {
//}
func TestBatchUpdateVendibility(t *testing.T) {
result, err := api.BatchUpdateVendibility("", "100130", "", []*StockVendibility{
result, err := api.BatchUpdateVendibility("", "800302", "", []*StockVendibility{
&StockVendibility{
OutSkuId: "26919",
OutSkuId: "6042945",
DoSale: true,
},
}, "test")