finance
黄伟 2 years ago
parent 573a37a3c8
commit 9163484778

@ -63,8 +63,8 @@ type ReplyCommodityLists struct {
} }
// Lists @Title 获取商品列表 // Lists @Title 获取商品列表
func (g *commodity) Lists(ctx context.Context, args ArgsCommodityList) (reply ReplyCommodityLists, err error) { func (c *commodity) Lists(ctx context.Context, args ArgsCommodityList) (reply ReplyCommodityLists, err error) {
xClient, err := client.GetClient(g) xClient, err := client.GetClient(c)
if err != nil { if err != nil {
return return
} }
@ -107,8 +107,8 @@ type SkuItem struct {
} }
// Info @Title 商品详情 // Info @Title 商品详情
func (g *commodity) Info(ctx context.Context, goodsId uint) (reply ReplyCommodityInfo, err error) { func (c *commodity) Info(ctx context.Context, goodsId uint) (reply ReplyCommodityInfo, err error) {
xClient, err := client.GetClient(g) xClient, err := client.GetClient(c)
if err != nil { if err != nil {
return return
} }
@ -122,8 +122,8 @@ type ReplyImgs struct {
} }
// GetImgs @Title 获取商品主图 // GetImgs @Title 获取商品主图
func (g *commodity) GetImgs(ctx context.Context, goodsIds []uint) (reply []ReplyImgs, err error) { func (c *commodity) GetImgs(ctx context.Context, goodsIds []uint) (reply []ReplyImgs, err error) {
xClient, err := client.GetClient(g) xClient, err := client.GetClient(c)
if err != nil { if err != nil {
return return
} }
@ -138,8 +138,8 @@ type AdoptItem struct {
} }
// Adopt @Title 批量入库 // Adopt @Title 批量入库
func (g *commodity) Adopt(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { func (c *commodity) Adopt(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) {
xClient, err := client.GetClient(g) xClient, err := client.GetClient(c)
if err != nil { if err != nil {
return return
} }
@ -148,8 +148,8 @@ func (g *commodity) Adopt(ctx context.Context, goodsIds []uint) (reply []AdoptIt
} }
// Discard @Title 批量废弃 // Discard @Title 批量废弃
func (g *commodity) Discard(ctx context.Context, goodsIds []uint) (err error) { func (c *commodity) Discard(ctx context.Context, goodsIds []uint) (err error) {
xClient, err := client.GetClient(g) xClient, err := client.GetClient(c)
if err != nil { if err != nil {
return return
} }
@ -158,28 +158,13 @@ func (g *commodity) Discard(ctx context.Context, goodsIds []uint) (err error) {
return return
} }
// ReHandle @Title 重新处理商品 //
func (g *commodity) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { //// ReHandle @Title 重新处理商品
xClient, err := client.GetClient(g) //func (c *commodity) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) {
if err != nil { // xClient, err := client.GetClient(c)
return nil, err // if err != nil {
} // return nil, err
err = xClient.Call(ctx, "ReHandle", goodsIds, &reply) // }
return // err = xClient.Call(ctx, "ReHandle", goodsIds, &reply)
} // return
//}
type ReplyByIdItem struct {
SkuId uint `json:"skuId"`
SupplierId uint `json:"supplierIds"`
SupplierName string `json:"supplierName"`
}
// FindBySkuIds @Title 根据商品Ids获取商品信息
func (g *commodity) FindBySkuIds(ctx context.Context, skuIds []uint) (reply []ReplyByIdItem, err error) {
xClient, err := client.GetClient(g)
if err != nil {
return nil, err
}
err = xClient.Call(ctx, "FindBySkuIds", skuIds, &reply)
return
}

@ -15,6 +15,7 @@ type source uint
const ( const (
SkuSourceJd source = 1 // 京东开普勒渠道 SkuSourceJd source = 1 // 京东开普勒渠道
SkuSourceSupplier source = 2 // 供应链供应商渠道 SkuSourceSupplier source = 2 // 供应链供应商渠道
SkuSourceOtoSaas source = 3 // 海旅供应商渠道
) )
const ( const (

Loading…
Cancel
Save