feat: product item

This commit is contained in:
zzw
2026-08-07 10:51:47 +08:00
52 changed files with 3562 additions and 1159 deletions
+13 -4
View File
@@ -14,14 +14,18 @@ import (
)
type (
AddReq = product.AddReq
AddResp = product.AddResp
EditReq = product.EditReq
EditResp = product.EditResp
AddReq = product.AddReq
AddResp = product.AddResp
EditReq = product.EditReq
EditResp = product.EditResp
ItemsReq = product.ItemsReq
ItemsResp = product.ItemsResp
Item = product.Item
Product interface {
Add(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
Edit(ctx context.Context, in *EditReq, opts ...grpc.CallOption) (*EditResp, error)
Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*ItemsResp, error)
}
defaultProduct struct {
@@ -44,3 +48,8 @@ func (m *defaultProduct) Edit(ctx context.Context, in *EditReq, opts ...grpc.Cal
client := product.NewProductClient(m.cli.Conn())
return client.Edit(ctx, in, opts...)
}
func (m *defaultProduct) Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*ItemsResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Items(ctx, in, opts...)
}