feat: product number
CI / changes (push) Successful in 36s
CI / docker-bff (push) Successful in 3m8s
CI / docker-product (push) Successful in 3m36s
CI / docker-admin (push) Successful in 3m35s
CI / docker-user (push) Successful in 9s
CI / docker-ad (push) Successful in 29s
CI / docker-chore (push) Failing after 4s
CI / changes (push) Successful in 36s
CI / docker-bff (push) Successful in 3m8s
CI / docker-product (push) Successful in 3m36s
CI / docker-admin (push) Successful in 3m35s
CI / docker-user (push) Successful in 9s
CI / docker-ad (push) Successful in 29s
CI / docker-chore (push) Failing after 4s
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
@@ -33,6 +34,8 @@ const (
|
||||
Product_EditSusceptible_FullMethodName = "/product.Product/EditSusceptible"
|
||||
Product_EditApplyPass_FullMethodName = "/product.Product/EditApplyPass"
|
||||
Product_Number_FullMethodName = "/product.Product/Number"
|
||||
Product_InfoById_FullMethodName = "/product.Product/InfoById"
|
||||
Product_ItemsByIds_FullMethodName = "/product.Product/ItemsByIds"
|
||||
Product_NumberAdd_FullMethodName = "/product.Product/NumberAdd"
|
||||
)
|
||||
|
||||
@@ -62,7 +65,9 @@ type ProductClient interface {
|
||||
EditApplyPass(ctx context.Context, in *EditApplyPassReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 增减库存
|
||||
// type: 1 增加, 2 减少
|
||||
Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
InfoById(ctx context.Context, in *InfoByIdReq, opts ...grpc.CallOption) (*Item, error)
|
||||
ItemsByIds(ctx context.Context, in *ItemsByIdsReq, opts ...grpc.CallOption) (*ItemsByIdsData, error)
|
||||
// 增加库存
|
||||
NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error)
|
||||
}
|
||||
@@ -205,9 +210,9 @@ func (c *productClient) EditApplyPass(ctx context.Context, in *EditApplyPassReq,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *productClient) Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
func (c *productClient) Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, Product_Number_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -215,6 +220,26 @@ func (c *productClient) Number(ctx context.Context, in *NumberReq, opts ...grpc.
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *productClient) InfoById(ctx context.Context, in *InfoByIdReq, opts ...grpc.CallOption) (*Item, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Item)
|
||||
err := c.cc.Invoke(ctx, Product_InfoById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *productClient) ItemsByIds(ctx context.Context, in *ItemsByIdsReq, opts ...grpc.CallOption) (*ItemsByIdsData, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ItemsByIdsData)
|
||||
err := c.cc.Invoke(ctx, Product_ItemsByIds_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *productClient) NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
@@ -251,7 +276,9 @@ type ProductServer interface {
|
||||
EditApplyPass(context.Context, *EditApplyPassReq) (*Response, error)
|
||||
// 增减库存
|
||||
// type: 1 增加, 2 减少
|
||||
Number(context.Context, *NumberReq) (*Response, error)
|
||||
Number(context.Context, *NumberReq) (*emptypb.Empty, error)
|
||||
InfoById(context.Context, *InfoByIdReq) (*Item, error)
|
||||
ItemsByIds(context.Context, *ItemsByIdsReq) (*ItemsByIdsData, error)
|
||||
// 增加库存
|
||||
NumberAdd(context.Context, *NumberAddReq) (*Response, error)
|
||||
mustEmbedUnimplementedProductServer()
|
||||
@@ -303,9 +330,15 @@ func (UnimplementedProductServer) EditSusceptible(context.Context, *EditSuscepti
|
||||
func (UnimplementedProductServer) EditApplyPass(context.Context, *EditApplyPassReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method EditApplyPass not implemented")
|
||||
}
|
||||
func (UnimplementedProductServer) Number(context.Context, *NumberReq) (*Response, error) {
|
||||
func (UnimplementedProductServer) Number(context.Context, *NumberReq) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Number not implemented")
|
||||
}
|
||||
func (UnimplementedProductServer) InfoById(context.Context, *InfoByIdReq) (*Item, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method InfoById not implemented")
|
||||
}
|
||||
func (UnimplementedProductServer) ItemsByIds(context.Context, *ItemsByIdsReq) (*ItemsByIdsData, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ItemsByIds not implemented")
|
||||
}
|
||||
func (UnimplementedProductServer) NumberAdd(context.Context, *NumberAddReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method NumberAdd not implemented")
|
||||
}
|
||||
@@ -582,6 +615,42 @@ func _Product_Number_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Product_InfoById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InfoByIdReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProductServer).InfoById(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Product_InfoById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProductServer).InfoById(ctx, req.(*InfoByIdReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Product_ItemsByIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ItemsByIdsReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProductServer).ItemsByIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Product_ItemsByIds_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProductServer).ItemsByIds(ctx, req.(*ItemsByIdsReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Product_NumberAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NumberAddReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -663,6 +732,14 @@ var Product_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Number",
|
||||
Handler: _Product_Number_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "InfoById",
|
||||
Handler: _Product_InfoById_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ItemsByIds",
|
||||
Handler: _Product_ItemsByIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NumberAdd",
|
||||
Handler: _Product_NumberAdd_Handler,
|
||||
|
||||
Reference in New Issue
Block a user