finance
黄伟 2 years ago
parent 29154949dd
commit b162c6d421

@ -3,16 +3,17 @@ package supply
import ( import (
"context" "context"
"git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
) )
type skuTag struct { type skuTag struct {
} }
type ArgsSkuTagAdds struct { type ArgsSkuTagAdds struct {
SkuIds []uint // skuIds SkuIds []uint // skuIds
TagIds []uint // tagIds TagId uint // tagId
} }
// Adds @Title 添加标签 // Adds @Title 添加商品
func (s *skuTag) Adds(ctx context.Context, args ArgsSkuTagAdds) error { func (s *skuTag) Adds(ctx context.Context, args ArgsSkuTagAdds) error {
reply := 0 reply := 0
xClient, err := client.GetClient(s) xClient, err := client.GetClient(s)
@ -23,16 +24,42 @@ func (s *skuTag) Adds(ctx context.Context, args ArgsSkuTagAdds) error {
} }
type ArgsSkuTagDel struct { type ArgsSkuTagDel struct {
SkuId uint // skuId SkuIds []uint // skuIds
TagIds []uint // tagIds TagId []uint // tagId
} }
// Del @Title 删除标签 // Dels @Title 删除商品
func (s *skuTag) Del(ctx context.Context, args ArgsSkuTagDel) error { func (s *skuTag) Dels(ctx context.Context, args ArgsSkuTagDel) error {
reply := 0 reply := 0
xClient, err := client.GetClient(s) xClient, err := client.GetClient(s)
if err != nil { if err != nil {
return err 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