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.
service/supply/skuTag.go

66 lines
1.3 KiB

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
TagId uint // tagId
}
// Adds @Title 添加商品
func (s *skuTag) Adds(ctx context.Context, args ArgsSkuTagAdds) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
return err
}
return xClient.Call(ctx, "Adds", args, &reply)
}
type ArgsSkuTagDels struct {
SkuIds []uint // skuIds
TagId uint // tagId
}
// Dels @Title 删除商品
func (s *skuTag) Dels(ctx context.Context, args ArgsSkuTagDels) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
return err
}
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
}