You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package _interface
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
|
|
|
|
type skuState uint
|
|
|
|
|
|
|
|
const (
|
|
|
|
SkuStateIn = 1 // 有货
|
|
|
|
SkuStateOut = 2 // 无货
|
|
|
|
SkuStateDone = 3 // 下架商品
|
|
|
|
)
|
|
|
|
|
|
|
|
type Sku interface {
|
|
|
|
// Stock 库存查询
|
|
|
|
Stock(ctx context.Context, args ArgsSkuStock, reply *[]ReplySkuStock) error
|
|
|
|
}
|
|
|
|
|
|
|
|
type ArgsSkuStock struct {
|
|
|
|
Address string // 地址
|
|
|
|
Skus []SkuStockItem // sku信息
|
|
|
|
}
|
|
|
|
|
|
|
|
type SkuStockItem struct {
|
|
|
|
SourceSkuId string // 源skuId
|
|
|
|
Quantity uint // 数量
|
|
|
|
}
|
|
|
|
type ReplySkuStock struct {
|
|
|
|
SourceSkuId string `json:"sourceSkuId"` // 源skuId
|
|
|
|
State uint `json:"state"` // 库存状态
|
|
|
|
}
|