|
@@ -24,6 +24,24 @@ const _ = grpc.SupportPackageIsVersion7
|
|
|
type GoodsCenterClient interface {
|
|
|
//查看标准商品分类
|
|
|
GetBaseGoodsStandClassify(ctx context.Context, in *ClassifyReq, opts ...grpc.CallOption) (*ClassifyResp, error)
|
|
|
+ //添加商品
|
|
|
+ GoodsAdd(ctx context.Context, in *GoodsAddReq, opts ...grpc.CallOption) (*GoodsAddResp, error)
|
|
|
+ //删除商品
|
|
|
+ GoodsDel(ctx context.Context, in *GoodsDelReq, opts ...grpc.CallOption) (*StatusResp, error)
|
|
|
+ //修改商品
|
|
|
+ GoodsUpd(ctx context.Context, in *GoodsAddReq, opts ...grpc.CallOption) (*StatusResp, error)
|
|
|
+ //查看商品
|
|
|
+ GoodsGet(ctx context.Context, in *GoodsGetReq, opts ...grpc.CallOption) (*GoodsGetResp, error)
|
|
|
+ //新增商品功能定义、功能定义明细表
|
|
|
+ FunctionDefineAdd(ctx context.Context, in *FunctionDefineReq, opts ...grpc.CallOption) (*StatusResp, error)
|
|
|
+ //新增商品规格
|
|
|
+ GoodsSpecAdd(ctx context.Context, in *GoodsSpecAddReq, opts ...grpc.CallOption) (*StatusResp, error)
|
|
|
+ //查看商品规格
|
|
|
+ GoodsSpecGet(ctx context.Context, in *GoodsSpecGetReq, opts ...grpc.CallOption) (*GoodsSpecGetResp, error)
|
|
|
+ //删除商品规格
|
|
|
+ GoodsSpecDel(ctx context.Context, in *GoodsSpecGetReq, opts ...grpc.CallOption) (*StatusResp, error)
|
|
|
+ //修改商品规格
|
|
|
+ GoodsSpecUpd(ctx context.Context, in *GoodsSpecAddReq, opts ...grpc.CallOption) (*StatusResp, error)
|
|
|
}
|
|
|
|
|
|
type goodsCenterClient struct {
|
|
@@ -43,12 +61,111 @@ func (c *goodsCenterClient) GetBaseGoodsStandClassify(ctx context.Context, in *C
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *goodsCenterClient) GoodsAdd(ctx context.Context, in *GoodsAddReq, opts ...grpc.CallOption) (*GoodsAddResp, error) {
|
|
|
+ out := new(GoodsAddResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsAdd", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) GoodsDel(ctx context.Context, in *GoodsDelReq, opts ...grpc.CallOption) (*StatusResp, error) {
|
|
|
+ out := new(StatusResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsDel", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) GoodsUpd(ctx context.Context, in *GoodsAddReq, opts ...grpc.CallOption) (*StatusResp, error) {
|
|
|
+ out := new(StatusResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsUpd", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) GoodsGet(ctx context.Context, in *GoodsGetReq, opts ...grpc.CallOption) (*GoodsGetResp, error) {
|
|
|
+ out := new(GoodsGetResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsGet", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) FunctionDefineAdd(ctx context.Context, in *FunctionDefineReq, opts ...grpc.CallOption) (*StatusResp, error) {
|
|
|
+ out := new(StatusResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/FunctionDefineAdd", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) GoodsSpecAdd(ctx context.Context, in *GoodsSpecAddReq, opts ...grpc.CallOption) (*StatusResp, error) {
|
|
|
+ out := new(StatusResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsSpecAdd", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) GoodsSpecGet(ctx context.Context, in *GoodsSpecGetReq, opts ...grpc.CallOption) (*GoodsSpecGetResp, error) {
|
|
|
+ out := new(GoodsSpecGetResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsSpecGet", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) GoodsSpecDel(ctx context.Context, in *GoodsSpecGetReq, opts ...grpc.CallOption) (*StatusResp, error) {
|
|
|
+ out := new(StatusResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsSpecDel", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *goodsCenterClient) GoodsSpecUpd(ctx context.Context, in *GoodsSpecAddReq, opts ...grpc.CallOption) (*StatusResp, error) {
|
|
|
+ out := new(StatusResp)
|
|
|
+ err := c.cc.Invoke(ctx, "/GoodsCenter/GoodsSpecUpd", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
// GoodsCenterServer is the server API for GoodsCenter service.
|
|
|
// All implementations must embed UnimplementedGoodsCenterServer
|
|
|
// for forward compatibility
|
|
|
type GoodsCenterServer interface {
|
|
|
//查看标准商品分类
|
|
|
GetBaseGoodsStandClassify(context.Context, *ClassifyReq) (*ClassifyResp, error)
|
|
|
+ //添加商品
|
|
|
+ GoodsAdd(context.Context, *GoodsAddReq) (*GoodsAddResp, error)
|
|
|
+ //删除商品
|
|
|
+ GoodsDel(context.Context, *GoodsDelReq) (*StatusResp, error)
|
|
|
+ //修改商品
|
|
|
+ GoodsUpd(context.Context, *GoodsAddReq) (*StatusResp, error)
|
|
|
+ //查看商品
|
|
|
+ GoodsGet(context.Context, *GoodsGetReq) (*GoodsGetResp, error)
|
|
|
+ //新增商品功能定义、功能定义明细表
|
|
|
+ FunctionDefineAdd(context.Context, *FunctionDefineReq) (*StatusResp, error)
|
|
|
+ //新增商品规格
|
|
|
+ GoodsSpecAdd(context.Context, *GoodsSpecAddReq) (*StatusResp, error)
|
|
|
+ //查看商品规格
|
|
|
+ GoodsSpecGet(context.Context, *GoodsSpecGetReq) (*GoodsSpecGetResp, error)
|
|
|
+ //删除商品规格
|
|
|
+ GoodsSpecDel(context.Context, *GoodsSpecGetReq) (*StatusResp, error)
|
|
|
+ //修改商品规格
|
|
|
+ GoodsSpecUpd(context.Context, *GoodsSpecAddReq) (*StatusResp, error)
|
|
|
mustEmbedUnimplementedGoodsCenterServer()
|
|
|
}
|
|
|
|
|
@@ -59,6 +176,33 @@ type UnimplementedGoodsCenterServer struct {
|
|
|
func (UnimplementedGoodsCenterServer) GetBaseGoodsStandClassify(context.Context, *ClassifyReq) (*ClassifyResp, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBaseGoodsStandClassify not implemented")
|
|
|
}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsAdd(context.Context, *GoodsAddReq) (*GoodsAddResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsAdd not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsDel(context.Context, *GoodsDelReq) (*StatusResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsDel not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsUpd(context.Context, *GoodsAddReq) (*StatusResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsUpd not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsGet(context.Context, *GoodsGetReq) (*GoodsGetResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsGet not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) FunctionDefineAdd(context.Context, *FunctionDefineReq) (*StatusResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method FunctionDefineAdd not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsSpecAdd(context.Context, *GoodsSpecAddReq) (*StatusResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsSpecAdd not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsSpecGet(context.Context, *GoodsSpecGetReq) (*GoodsSpecGetResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsSpecGet not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsSpecDel(context.Context, *GoodsSpecGetReq) (*StatusResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsSpecDel not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedGoodsCenterServer) GoodsSpecUpd(context.Context, *GoodsSpecAddReq) (*StatusResp, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GoodsSpecUpd not implemented")
|
|
|
+}
|
|
|
func (UnimplementedGoodsCenterServer) mustEmbedUnimplementedGoodsCenterServer() {}
|
|
|
|
|
|
// UnsafeGoodsCenterServer may be embedded to opt out of forward compatibility for this service.
|
|
@@ -90,6 +234,168 @@ func _GoodsCenter_GetBaseGoodsStandClassify_Handler(srv interface{}, ctx context
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
|
|
|
|
+func _GoodsCenter_GoodsAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsAddReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsAdd(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsAdd",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsAdd(ctx, req.(*GoodsAddReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_GoodsDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsDelReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsDel(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsDel",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsDel(ctx, req.(*GoodsDelReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_GoodsUpd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsAddReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsUpd(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsUpd",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsUpd(ctx, req.(*GoodsAddReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_GoodsGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsGetReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsGet(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsGet",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsGet(ctx, req.(*GoodsGetReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_FunctionDefineAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(FunctionDefineReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).FunctionDefineAdd(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/FunctionDefineAdd",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).FunctionDefineAdd(ctx, req.(*FunctionDefineReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_GoodsSpecAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsSpecAddReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecAdd(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsSpecAdd",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecAdd(ctx, req.(*GoodsSpecAddReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_GoodsSpecGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsSpecGetReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecGet(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsSpecGet",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecGet(ctx, req.(*GoodsSpecGetReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_GoodsSpecDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsSpecGetReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecDel(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsSpecDel",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecDel(ctx, req.(*GoodsSpecGetReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _GoodsCenter_GoodsSpecUpd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(GoodsSpecAddReq)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecUpd(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/GoodsCenter/GoodsSpecUpd",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(GoodsCenterServer).GoodsSpecUpd(ctx, req.(*GoodsSpecAddReq))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
// GoodsCenter_ServiceDesc is the grpc.ServiceDesc for GoodsCenter service.
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
// and not to be introspected or modified (even as a copy)
|
|
@@ -101,6 +407,42 @@ var GoodsCenter_ServiceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "GetBaseGoodsStandClassify",
|
|
|
Handler: _GoodsCenter_GetBaseGoodsStandClassify_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "GoodsAdd",
|
|
|
+ Handler: _GoodsCenter_GoodsAdd_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GoodsDel",
|
|
|
+ Handler: _GoodsCenter_GoodsDel_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GoodsUpd",
|
|
|
+ Handler: _GoodsCenter_GoodsUpd_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GoodsGet",
|
|
|
+ Handler: _GoodsCenter_GoodsGet_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "FunctionDefineAdd",
|
|
|
+ Handler: _GoodsCenter_FunctionDefineAdd_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GoodsSpecAdd",
|
|
|
+ Handler: _GoodsCenter_GoodsSpecAdd_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GoodsSpecGet",
|
|
|
+ Handler: _GoodsCenter_GoodsSpecGet_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GoodsSpecDel",
|
|
|
+ Handler: _GoodsCenter_GoodsSpecDel_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GoodsSpecUpd",
|
|
|
+ Handler: _GoodsCenter_GoodsSpecUpd_Handler,
|
|
|
+ },
|
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "goodsCenter.proto",
|