This commit is contained in:
邹宗楠
2025-03-24 15:40:21 +08:00
parent 2663099187
commit cf38acc037
12 changed files with 64 additions and 44 deletions

View File

@@ -34,11 +34,11 @@ func init() {
// 京东白货
//api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349")
// 果切 379599
//api = New("ad4061a1-6a5c-43f9-bf51-b1232fd9499d", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec")
api = New("8a843f5c-6c75-4604-9976-04c1aae3decc", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec")
// 381564
//api = New("4d0c707a-54eb-4f05-8187-6cedf95827c7", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da")
// 390558
api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349")
//api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349")
// 384633
///api = New("02a3f772-89f3-46f1-bbd5-74be346cba54", "e496a0f9b88a407297fea283b8dc9e29", "9bb82ffbec144c4b8fc8d627e5ca6a35")

View File

@@ -395,3 +395,17 @@ type JDSkuList struct {
FixedType int `json:"fixedType,omitempty"`
SuperId int `json:"superId,omitempty"`
}
// UnBindStoreGoods 解绑商品
func (a *API) UnBindStoreGoods(skuId int64) {
jdParams := map[string]interface{}{
"skuId": skuId,
"stationNo": "14986394",
"opPin": "liulei",
}
data, err := a.AccessAPINoPage("StoreGoodsPlatformService/unBindStoreGoods", jdParams, nil, nil, genNoPageResultParser("code", "msg", "data", "0"))
if err != nil {
return
}
fmt.Println(data)
}

View File

@@ -60,17 +60,19 @@ func TestDelVipPrice(t *testing.T) {
//}
func TestBatchUpdateVendibility(t *testing.T) {
result, err := api.BatchUpdateVendibility("", "800302", "", []*StockVendibility{
&StockVendibility{
OutSkuId: "6042945",
DoSale: true,
},
}, "test")
if err != nil {
t.Fatal(err)
data := []int64{1}
for _, v := range data {
_, err := api.BatchUpdateVendibility("liulei", "", "14986394", []*StockVendibility{
&StockVendibility{
OutSkuId: utils.Int64ToStr(v),
DoSale: false,
},
}, "test")
if err != nil {
t.Fatal(err)
}
}
t.Log(utils.Format4Output(result, false))
//baseapi.SugarLogger.Debug(utils.Format4Output(result, false))
}
func TestUpdateVendibility(t *testing.T) {
@@ -172,3 +174,7 @@ func (t *Object2222) getParam(key string) int {
func TestGetSkuList(t *testing.T) {
api.AuerySkuInfoList(0, 100)
}
func TestUnBindStoreGoods(t *testing.T) {
api.UnBindStoreGoods(31985)
}