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

67 lines
1.4 KiB

package supply
import (
"context"
"git.oa00.com/supply-chain/service/client"
2 years ago
"git.oa00.com/supply-chain/service/lib/bean"
)
type skuTag struct {
}
type ArgsSkuTagAdds struct {
SkuIds []uint // skuIds
2 years ago
TagId uint // tagId
}
2 years ago
// 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)
}
2 years ago
type ArgsSkuTagDels struct {
2 years ago
SkuIds []uint // skuIds
2 years ago
TagId uint // tagId
}
2 years ago
// Dels @Title 删除商品
2 years ago
func (s *skuTag) Dels(ctx context.Context, args ArgsSkuTagDels) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
return err
}
2 years ago
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"`
Status uint `json:"status"` // 上下架状态 1=上架 2=下架
2 years ago
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
}