|
|
@ -14,6 +14,9 @@ const (
|
|
|
|
|
|
|
|
|
|
|
|
SkuHandleNone = 1 // 未处理
|
|
|
|
SkuHandleNone = 1 // 未处理
|
|
|
|
SkuHandleStart = 2 // 开始处理
|
|
|
|
SkuHandleStart = 2 // 开始处理
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SkuJdStatusUp = 1 // 京东上架
|
|
|
|
|
|
|
|
SkuJdStatusDown = 2 // 京东下架
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type sku struct {
|
|
|
|
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)
|
|
|
|
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 入库
|
|
|
|
// Adopt @Title 入库
|
|
|
|
func (s *sku) Adopt(ctx context.Context, skuIds []uint) error {
|
|
|
|
func (s *sku) Adopt(ctx context.Context, skuIds []uint) (reply AdoptItem, err error) {
|
|
|
|
reply := 0
|
|
|
|
err = client.GetClient(s).Call(ctx, "Adopt", skuIds, &reply)
|
|
|
|
return client.GetClient(s).Call(ctx, "Adopt", skuIds, &reply)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|