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/category.go

46 lines
1.2 KiB

package jd
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
)
type category struct {
}
type ArgsCategoryList struct {
Page bean.Page
}
type CategoryItem struct {
Id uint `json:"id"`
FirstCategoryName string `json:"firstCategoryName"`
SecondCategoryName string `json:"secondCategoryName"`
ThirdCategoryName string `json:"thirdCategoryName"`
SupplyCategoryId uint `json:"supplyCategoryId"`
}
type ReplyCategoryList struct {
Lists []CategoryItem `json:"lists"`
Total int64 `json:"total"`
}
// Lists @Title 获取品牌匹配列表
func (c *category) Lists(ctx context.Context, args ArgsCategoryList) (reply ReplyCategoryList, err error) {
err = client.GetClient(c).Call(ctx, "Lists", args, &reply)
return
}
type ArgsCategoryEdit struct {
CategoryId uint // 分类id
FirstCategoryName string // 一级分类名称
SecondCategoryName string // 二级分类名称
ThirdCategoryName string // 三级分类名称
SupplyCategoryId uint // 匹配分类id
}
// Edit @Title 编辑品牌匹配
func (c *category) Edit(ctx context.Context, args ArgsCategoryEdit) error {
reply := 0
return client.GetClient(c).Call(ctx, "Edit", args, &reply)
}