finance
黄伟 2 years ago
parent 29154949dd
commit b162c6d421

@ -3,16 +3,17 @@ package supply
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
)
type skuTag struct {
}
type ArgsSkuTagAdds struct {
SkuIds []uint // skuIds
TagIds []uint // tagIds
TagId uint // tagId
}
// Adds @Title 添加标签
// Adds @Title 添加商品
func (s *skuTag) Adds(ctx context.Context, args ArgsSkuTagAdds) error {
reply := 0
xClient, err := client.GetClient(s)
@ -23,16 +24,42 @@ func (s *skuTag) Adds(ctx context.Context, args ArgsSkuTagAdds) error {
}
type ArgsSkuTagDel struct {
SkuId uint // skuId
TagIds []uint // tagIds
SkuIds []uint // skuIds
TagId []uint // tagId
}
// Del @Title 删除标签
func (s *skuTag) Del(ctx context.Context, args ArgsSkuTagDel) error {
// Dels @Title 删除商品
func (s *skuTag) Dels(ctx context.Context, args ArgsSkuTagDel) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
return err
}
return xClient.Call(ctx, "Del", args, &reply)
return xClient.Call(ctx, "Dels", args, &reply)
}
type ArgsTagSkuLists struct {
TagId uint
Page bean.Page
}
type TagSkuItem struct {
Id uint `json:"id"`
SkuId uint `json:"skuId"`
SkuName string `json:"skuName"`
}
type ReplyTagSkuLists struct {
Total int64 `json:"total"`
Lists []TagSkuItem `json:"lists"`
}
// SkuLists @Title 标签商品列表
func (s *skuTag) SkuLists(ctx context.Context, args ArgsTagSkuLists) (reply ReplyTagSkuLists, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
err = xClient.Call(ctx, "SkuLists", args, &reply)
return
}

Loading…
Cancel
Save