liujiandao
2024-03-15 283a54070553e81a2e73d4b8b9ea1d717c2f512e
补充
2个文件已添加
401 ■■■■■ 已修改文件
proto/crm_srm/crm_srm.pb.go 300 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/crm_srm/crm_srm_grpc.pb.go 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/crm_srm/crm_srm.pb.go
New file
@@ -0,0 +1,300 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
//     protoc-gen-go v1.26.0
//     protoc        v4.24.0
// source: crm_srm.proto
package crm_srm
import (
    protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    reflect "reflect"
    sync "sync"
)
const (
    // Verify that this generated code is sufficiently up-to-date.
    _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    // Verify that runtime/protoimpl is sufficiently up-to-date.
    _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type CrmGetPurchaseInfoRequest struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    SalesDetailsNumber string `protobuf:"bytes,1,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"`
}
func (x *CrmGetPurchaseInfoRequest) Reset() {
    *x = CrmGetPurchaseInfoRequest{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_srm_proto_msgTypes[0]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *CrmGetPurchaseInfoRequest) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*CrmGetPurchaseInfoRequest) ProtoMessage() {}
func (x *CrmGetPurchaseInfoRequest) ProtoReflect() protoreflect.Message {
    mi := &file_crm_srm_proto_msgTypes[0]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use CrmGetPurchaseInfoRequest.ProtoReflect.Descriptor instead.
func (*CrmGetPurchaseInfoRequest) Descriptor() ([]byte, []int) {
    return file_crm_srm_proto_rawDescGZIP(), []int{0}
}
func (x *CrmGetPurchaseInfoRequest) GetSalesDetailsNumber() string {
    if x != nil {
        return x.SalesDetailsNumber
    }
    return ""
}
type CrmGetPurchaseInfo struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    Amount       int64  `protobuf:"varint,1,opt,name=Amount,proto3" json:"Amount,omitempty"`
    FinishAmount int64  `protobuf:"varint,2,opt,name=FinishAmount,proto3" json:"FinishAmount,omitempty"`
    ProductId    string `protobuf:"bytes,3,opt,name=ProductId,proto3" json:"ProductId,omitempty"`
}
func (x *CrmGetPurchaseInfo) Reset() {
    *x = CrmGetPurchaseInfo{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_srm_proto_msgTypes[1]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *CrmGetPurchaseInfo) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*CrmGetPurchaseInfo) ProtoMessage() {}
func (x *CrmGetPurchaseInfo) ProtoReflect() protoreflect.Message {
    mi := &file_crm_srm_proto_msgTypes[1]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use CrmGetPurchaseInfo.ProtoReflect.Descriptor instead.
func (*CrmGetPurchaseInfo) Descriptor() ([]byte, []int) {
    return file_crm_srm_proto_rawDescGZIP(), []int{1}
}
func (x *CrmGetPurchaseInfo) GetAmount() int64 {
    if x != nil {
        return x.Amount
    }
    return 0
}
func (x *CrmGetPurchaseInfo) GetFinishAmount() int64 {
    if x != nil {
        return x.FinishAmount
    }
    return 0
}
func (x *CrmGetPurchaseInfo) GetProductId() string {
    if x != nil {
        return x.ProductId
    }
    return ""
}
type CrmGetPurchaseInfoResponse struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    Info []*CrmGetPurchaseInfo `protobuf:"bytes,1,rep,name=Info,proto3" json:"Info,omitempty"`
}
func (x *CrmGetPurchaseInfoResponse) Reset() {
    *x = CrmGetPurchaseInfoResponse{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_srm_proto_msgTypes[2]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *CrmGetPurchaseInfoResponse) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*CrmGetPurchaseInfoResponse) ProtoMessage() {}
func (x *CrmGetPurchaseInfoResponse) ProtoReflect() protoreflect.Message {
    mi := &file_crm_srm_proto_msgTypes[2]
    if protoimpl.UnsafeEnabled && x != nil {
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        if ms.LoadMessageInfo() == nil {
            ms.StoreMessageInfo(mi)
        }
        return ms
    }
    return mi.MessageOf(x)
}
// Deprecated: Use CrmGetPurchaseInfoResponse.ProtoReflect.Descriptor instead.
func (*CrmGetPurchaseInfoResponse) Descriptor() ([]byte, []int) {
    return file_crm_srm_proto_rawDescGZIP(), []int{2}
}
func (x *CrmGetPurchaseInfoResponse) GetInfo() []*CrmGetPurchaseInfo {
    if x != nil {
        return x.Info
    }
    return nil
}
var File_crm_srm_proto protoreflect.FileDescriptor
var file_crm_srm_proto_rawDesc = []byte{
    0x0a, 0x0d, 0x63, 0x72, 0x6d, 0x5f, 0x73, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
    0x4b, 0x0a, 0x19, 0x43, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73,
    0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12,
    0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62,
    0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44,
    0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x6e, 0x0a, 0x12,
    0x43, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e,
    0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
    0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x69,
    0x6e, 0x69, 0x73, 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
    0x52, 0x0c, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c,
    0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
    0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x1a,
    0x43, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e,
    0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x49, 0x6e,
    0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x72, 0x6d, 0x47, 0x65,
    0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49,
    0x6e, 0x66, 0x6f, 0x32, 0x63, 0x0a, 0x10, 0x43, 0x72, 0x6d, 0x41, 0x6e, 0x64, 0x53, 0x72, 0x6d,
    0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x43, 0x72, 0x6d, 0x47, 0x65,
    0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e,
    0x43, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e,
    0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x43, 0x72, 0x6d, 0x47,
    0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
    0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x63, 0x72,
    0x6d, 0x5f, 0x73, 0x72, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
    file_crm_srm_proto_rawDescOnce sync.Once
    file_crm_srm_proto_rawDescData = file_crm_srm_proto_rawDesc
)
func file_crm_srm_proto_rawDescGZIP() []byte {
    file_crm_srm_proto_rawDescOnce.Do(func() {
        file_crm_srm_proto_rawDescData = protoimpl.X.CompressGZIP(file_crm_srm_proto_rawDescData)
    })
    return file_crm_srm_proto_rawDescData
}
var file_crm_srm_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_crm_srm_proto_goTypes = []interface{}{
    (*CrmGetPurchaseInfoRequest)(nil),  // 0: CrmGetPurchaseInfoRequest
    (*CrmGetPurchaseInfo)(nil),         // 1: CrmGetPurchaseInfo
    (*CrmGetPurchaseInfoResponse)(nil), // 2: CrmGetPurchaseInfoResponse
}
var file_crm_srm_proto_depIdxs = []int32{
    1, // 0: CrmGetPurchaseInfoResponse.Info:type_name -> CrmGetPurchaseInfo
    0, // 1: CrmAndSrmService.CrmGetPurchaseInfo:input_type -> CrmGetPurchaseInfoRequest
    2, // 2: CrmAndSrmService.CrmGetPurchaseInfo:output_type -> CrmGetPurchaseInfoResponse
    2, // [2:3] is the sub-list for method output_type
    1, // [1:2] is the sub-list for method input_type
    1, // [1:1] is the sub-list for extension type_name
    1, // [1:1] is the sub-list for extension extendee
    0, // [0:1] is the sub-list for field type_name
}
func init() { file_crm_srm_proto_init() }
func file_crm_srm_proto_init() {
    if File_crm_srm_proto != nil {
        return
    }
    if !protoimpl.UnsafeEnabled {
        file_crm_srm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*CrmGetPurchaseInfoRequest); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_crm_srm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*CrmGetPurchaseInfo); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_crm_srm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*CrmGetPurchaseInfoResponse); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
    }
    type x struct{}
    out := protoimpl.TypeBuilder{
        File: protoimpl.DescBuilder{
            GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
            RawDescriptor: file_crm_srm_proto_rawDesc,
            NumEnums:      0,
            NumMessages:   3,
            NumExtensions: 0,
            NumServices:   1,
        },
        GoTypes:           file_crm_srm_proto_goTypes,
        DependencyIndexes: file_crm_srm_proto_depIdxs,
        MessageInfos:      file_crm_srm_proto_msgTypes,
    }.Build()
    File_crm_srm_proto = out.File
    file_crm_srm_proto_rawDesc = nil
    file_crm_srm_proto_goTypes = nil
    file_crm_srm_proto_depIdxs = nil
}
proto/crm_srm/crm_srm_grpc.pb.go
New file
@@ -0,0 +1,101 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package crm_srm
import (
    context "context"
    grpc "google.golang.org/grpc"
    codes "google.golang.org/grpc/codes"
    status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// CrmAndSrmServiceClient is the client API for CrmAndSrmService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CrmAndSrmServiceClient interface {
    CrmGetPurchaseInfo(ctx context.Context, in *CrmGetPurchaseInfoRequest, opts ...grpc.CallOption) (*CrmGetPurchaseInfoResponse, error)
}
type crmAndSrmServiceClient struct {
    cc grpc.ClientConnInterface
}
func NewCrmAndSrmServiceClient(cc grpc.ClientConnInterface) CrmAndSrmServiceClient {
    return &crmAndSrmServiceClient{cc}
}
func (c *crmAndSrmServiceClient) CrmGetPurchaseInfo(ctx context.Context, in *CrmGetPurchaseInfoRequest, opts ...grpc.CallOption) (*CrmGetPurchaseInfoResponse, error) {
    out := new(CrmGetPurchaseInfoResponse)
    err := c.cc.Invoke(ctx, "/CrmAndSrmService/CrmGetPurchaseInfo", in, out, opts...)
    if err != nil {
        return nil, err
    }
    return out, nil
}
// CrmAndSrmServiceServer is the server API for CrmAndSrmService service.
// All implementations must embed UnimplementedCrmAndSrmServiceServer
// for forward compatibility
type CrmAndSrmServiceServer interface {
    CrmGetPurchaseInfo(context.Context, *CrmGetPurchaseInfoRequest) (*CrmGetPurchaseInfoResponse, error)
    mustEmbedUnimplementedCrmAndSrmServiceServer()
}
// UnimplementedCrmAndSrmServiceServer must be embedded to have forward compatible implementations.
type UnimplementedCrmAndSrmServiceServer struct {
}
func (UnimplementedCrmAndSrmServiceServer) CrmGetPurchaseInfo(context.Context, *CrmGetPurchaseInfoRequest) (*CrmGetPurchaseInfoResponse, error) {
    return nil, status.Errorf(codes.Unimplemented, "method CrmGetPurchaseInfo not implemented")
}
func (UnimplementedCrmAndSrmServiceServer) mustEmbedUnimplementedCrmAndSrmServiceServer() {}
// UnsafeCrmAndSrmServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CrmAndSrmServiceServer will
// result in compilation errors.
type UnsafeCrmAndSrmServiceServer interface {
    mustEmbedUnimplementedCrmAndSrmServiceServer()
}
func RegisterCrmAndSrmServiceServer(s grpc.ServiceRegistrar, srv CrmAndSrmServiceServer) {
    s.RegisterService(&CrmAndSrmService_ServiceDesc, srv)
}
func _CrmAndSrmService_CrmGetPurchaseInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(CrmGetPurchaseInfoRequest)
    if err := dec(in); err != nil {
        return nil, err
    }
    if interceptor == nil {
        return srv.(CrmAndSrmServiceServer).CrmGetPurchaseInfo(ctx, in)
    }
    info := &grpc.UnaryServerInfo{
        Server:     srv,
        FullMethod: "/CrmAndSrmService/CrmGetPurchaseInfo",
    }
    handler := func(ctx context.Context, req interface{}) (interface{}, error) {
        return srv.(CrmAndSrmServiceServer).CrmGetPurchaseInfo(ctx, req.(*CrmGetPurchaseInfoRequest))
    }
    return interceptor(ctx, in, info, handler)
}
// CrmAndSrmService_ServiceDesc is the grpc.ServiceDesc for CrmAndSrmService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CrmAndSrmService_ServiceDesc = grpc.ServiceDesc{
    ServiceName: "CrmAndSrmService",
    HandlerType: (*CrmAndSrmServiceServer)(nil),
    Methods: []grpc.MethodDesc{
        {
            MethodName: "CrmGetPurchaseInfo",
            Handler:    _CrmAndSrmService_CrmGetPurchaseInfo_Handler,
        },
    },
    Streams:  []grpc.StreamDesc{},
    Metadata: "crm_srm.proto",
}