From 07e4350f78df6451658e7492dfa2e3b6710a29c8 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 21 Jul 2022 17:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=A5=E5=BA=93=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/sku.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/jd/sku.go b/jd/sku.go index b4ef845..2189032 100644 --- a/jd/sku.go +++ b/jd/sku.go @@ -14,6 +14,9 @@ const ( SkuHandleNone = 1 // 未处理 SkuHandleStart = 2 // 开始处理 + + SkuJdStatusUp = 1 // 京东上架 + SkuJdStatusDown = 2 // 京东下架 ) type sku struct { @@ -131,8 +134,15 @@ func (s *sku) Discard(ctx context.Context, skuIds []uint) error { return client.GetClient(s).Call(ctx, "Discard", skuIds, &reply) } +type AdoptItem struct { + Id uint `json:"id"` + JdSkuId uint64 `json:"jdSkuId"` + Name string `json:"name"` + Error string `json:"error"` +} + // Adopt @Title 入库 -func (s *sku) Adopt(ctx context.Context, skuIds []uint) error { - reply := 0 - return client.GetClient(s).Call(ctx, "Adopt", skuIds, &reply) +func (s *sku) Adopt(ctx context.Context, skuIds []uint) (reply AdoptItem, err error) { + err = client.GetClient(s).Call(ctx, "Adopt", skuIds, &reply) + return }