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/customer/sku/banner.go

53 lines
988 B

package sku
import (
"context"
"git.oa00.com/supply-chain/service/client"
)
type banner struct {
}
type BannerItem struct {
Id uint `json:"id"`
Img string `json:"img"`
SkuId uint `json:"skuId"`
}
// All @Title 全部轮播图
func (b *banner) All(ctx context.Context) (reply []BannerItem, err error) {
xClient, err := client.GetClient(b)
if err != nil {
return
}
args := 0
err = xClient.Call(ctx, "All", args, &reply)
return
}
type ArgsSkuBannerEdit struct {
Id uint
SkuId uint
Img string
}
// Edit @Title 编辑轮播图
func (b *banner) Edit(ctx context.Context, args ArgsSkuBannerEdit) (err error) {
xClient, err := client.GetClient(b)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Edit", args, &reply)
}
// Del @Title 删除轮播图
func (b *banner) Del(ctx context.Context, id uint) (err error) {
xClient, err := client.GetClient(b)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Del", id, &reply)
}