|
|
|
@ -40,6 +40,21 @@ func (c *category) Add(ctx context.Context, args ArgsCategoryAdd) (err error) {
|
|
|
|
|
return xClient.Call(ctx, "Add", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ReplyCategoryAddError struct {
|
|
|
|
|
CategoryName string
|
|
|
|
|
ErrMsg string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Adds @Title 添加分类
|
|
|
|
|
func (c *category) Adds(ctx context.Context, args []ArgsCategoryAdd) (reply []ReplyCategoryAddError, err error) {
|
|
|
|
|
xClient, err := client.GetClient(c)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(ctx, "Adds", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsCategoryEdit struct {
|
|
|
|
|
CategoryId uint // 分类id
|
|
|
|
|
Name string // 分类名称
|
|
|
|
|