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/jd/brand.go

52 lines
1.2 KiB

2 years ago
package jd
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
)
type brand struct {
}
type ArgsBrandList struct {
Page bean.Page
}
type BrandItem struct {
Id uint `json:"id"`
Name string `json:"name"`
SupplyBrandId uint `json:"supplyBrandId"`
}
type ReplyBrandList struct {
Lists []BrandItem `json:"lists"`
Total int64 `json:"total"`
}
// Lists @Title 获取品牌匹配列表
func (b *brand) Lists(ctx context.Context, args ArgsBrandList) (reply ReplyBrandList, err error) {
err = client.GetClient(b).Call(ctx, "Lists", args, &reply)
return
}
type ArgsBrandEdit struct {
BrandId uint // 品牌id
Name string // 修改品牌名称
SupplyBrandId uint // 修改匹配品牌id
}
// Edit @Title 编辑品牌匹配
func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error {
reply := 0
return client.GetClient(b).Call(ctx, "Edit", args, &reply)
}
2 years ago
type ArgsImport struct {
2 years ago
Name string // 品牌名称
SupplyBrandId uint // 匹配的品牌Id
2 years ago
}
func (b *brand) Import(ctx context.Context, args []ArgsImport) error {
reply := 0
return client.GetClient(b).Call(ctx, "Import", args, &reply)
}