icole %!s(int64=4) %!d(string=hai) anos
pai
achega
7195c99ac4

+ 13 - 5
internal/logic/geterpcitytreelogic.go

@@ -2,6 +2,7 @@ package logic
 
 import (
 	"context"
+	"git.i2edu.net/i2/i2-bill-erp/model"
 	"git.i2edu.net/i2/i2-bill-erp/utils"
 
 	"git.i2edu.net/i2/i2-bill-erp/internal/svc"
@@ -24,18 +25,25 @@ func NewGetErpCityTreeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
 	}
 }
 
-func (l *GetErpCityTreeLogic) GetErpCityTree() (*transform.TreeNodes, error) {
+func (l *GetErpCityTreeLogic) GetErpCityTree(in *transform.Empty) (*transform.TreeNodes, error) {
 	var nodes = new([]*transform.TreeNode)
+	var cits = new([]model.BaseOrgan)
 	sql := `select
-			base_organ.id,
-			base_organ.name,
-			CASE WHEN base_organ.parent != 0 THEN base_organ.parent END parent
+			*
 		from
 			base_organ
 		where
 			base_organ.del_flag = 0
+			and organ_type != 105
 			group by base_organ.id`
-	err := l.svcCtx.SqlConn.QueryRows(nodes, sql)
+	err := l.svcCtx.SqlConn.QueryRows(cits, sql)
+	for _, c := range *cits {
+		node := new(transform.TreeNode)
+		node.Id = c.Id
+		node.Parent = c.Parent.Int64
+		node.Text = c.Name.String
+		*nodes = append(*nodes, node)
+	}
 	if err != nil {
 		return nil, err
 	}

+ 11 - 1
internal/server/transformserver.go

@@ -33,5 +33,15 @@ func (s *TransformServer) ParseToken(ctx context.Context, in *transform.TokenReq
 
 func (s *TransformServer) GetErpCityTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
 	l := logic.NewGetErpCityTreeLogic(ctx, s.svcCtx)
-	return l.GetErpCityTree()
+	return l.GetErpCityTree(in)
+}
+
+func (s *TransformServer) GetErpOptionset(ctx context.Context, in *transform.OptionCode) (*transform.Options, error) {
+	l := logic.NewGetErpOptionsetLogic(ctx, s.svcCtx)
+	return l.GetErpOptionset(in)
+}
+
+func (s *TransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
+	l := logic.NewGetErpMktNetWorkDetailTreeLogic(ctx, s.svcCtx)
+	return l.GetErpMktNetWorkDetailTree(in)
 }

+ 16 - 0
model/mkt_network_detail.sql

@@ -0,0 +1,16 @@
+CREATE TABLE `mkt_network_detail`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `parent` int(11) NULL DEFAULT NULL,
+  `inheritance` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `remake` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `create_by` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `create_time` datetime(0) NULL DEFAULT NULL,
+  `last_update_by` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+  `last_update_time` datetime(0) NULL DEFAULT NULL,
+  `del_flag` float NULL DEFAULT NULL,
+  `qudao` int(11) NULL DEFAULT NULL,
+  `channel_type` int(11) NULL DEFAULT NULL,
+  `query_type` int(11) NULL DEFAULT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1529 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

+ 12 - 0
model/sys_optionset.sql

@@ -0,0 +1,12 @@
+CREATE TABLE `sys_optionset`  (
+  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `name` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `code` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `value` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `create_by` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `create_time` datetime(0) NOT NULL,
+  `last_update_by` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+  `last_update_time` bigint(20) NOT NULL,
+  `del_flag` int(11) NOT NULL,
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

+ 17 - 6
transform.proto

@@ -9,13 +9,13 @@ message UserRequest {
 
 message UserResponse {
   string id = 1;
-  string phone  = 2;
-  string roles  = 3;
-  int64 status  = 4;
+  string phone = 2;
+  string roles = 3;
+  int64 status = 4;
   int64 erpRoleType = 5;
-  string userName       = 6;
-  string cityName       = 7;
-  int64 gender          = 8;
+  string userName = 6;
+  string cityName = 7;
+  int64 gender = 8;
 }
 
 message TokenRequest {
@@ -45,10 +45,21 @@ message Tag{
   string name = 2;
 }
 
+message OptionCode{
+  string code = 1;
+}
+
+message Options{
+  string code = 1;
+  string name = 2;
+  string value = 3;
+}
 
 
 service Transform {
   rpc GetUser(UserRequest) returns(UserResponse);
   rpc ParseToken(TokenRequest) returns(TokenResponse);
   rpc GetErpCityTree(Empty) returns(TreeNodes);
+  rpc GetErpOptionset(OptionCode) returns(Options);
+  rpc GetErpMktNetWorkDetailTree(Empty) returns(TreeNodes);
 }

+ 248 - 21
transform/transform.pb.go

@@ -500,6 +500,116 @@ func (x *Tag) GetName() string {
 	return ""
 }
 
+type OptionCode struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
+}
+
+func (x *OptionCode) Reset() {
+	*x = OptionCode{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_transform_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *OptionCode) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OptionCode) ProtoMessage() {}
+
+func (x *OptionCode) ProtoReflect() protoreflect.Message {
+	mi := &file_transform_proto_msgTypes[8]
+	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 OptionCode.ProtoReflect.Descriptor instead.
+func (*OptionCode) Descriptor() ([]byte, []int) {
+	return file_transform_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *OptionCode) GetCode() string {
+	if x != nil {
+		return x.Code
+	}
+	return ""
+}
+
+type Options struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code  string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
+	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *Options) Reset() {
+	*x = Options{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_transform_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Options) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Options) ProtoMessage() {}
+
+func (x *Options) ProtoReflect() protoreflect.Message {
+	mi := &file_transform_proto_msgTypes[9]
+	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 Options.ProtoReflect.Descriptor instead.
+func (*Options) Descriptor() ([]byte, []int) {
+	return file_transform_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *Options) GetCode() string {
+	if x != nil {
+		return x.Code
+	}
+	return ""
+}
+
+func (x *Options) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *Options) GetValue() string {
+	if x != nil {
+		return x.Value
+	}
+	return ""
+}
+
 var File_transform_proto protoreflect.FileDescriptor
 
 var file_transform_proto_rawDesc = []byte{
@@ -542,20 +652,35 @@ var file_transform_proto_rawDesc = []byte{
 	0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x29,
 	0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
 	0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xc2, 0x01, 0x0a, 0x09, 0x54, 0x72,
-	0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73,
-	0x65, 0x72, 0x12, 0x16, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x55,
-	0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x74, 0x72, 0x61,
-	0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
-	0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65,
-	0x6e, 0x12, 0x17, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x54, 0x6f,
-	0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x72, 0x61,
-	0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70,
-	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x72, 0x70, 0x43, 0x69,
-	0x74, 0x79, 0x54, 0x72, 0x65, 0x65, 0x12, 0x10, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f,
-	0x72, 0x6d, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73,
-	0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x62, 0x06,
-	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x0a, 0x0a, 0x4f, 0x70, 0x74,
+	0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x47, 0x0a, 0x07, 0x4f,
+	0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+	0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,
+	0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
+	0x61, 0x6c, 0x75, 0x65, 0x32, 0xc6, 0x02, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f,
+	0x72, 0x6d, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x16, 0x2e,
+	0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
+	0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f,
+	0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x2e, 0x74,
+	0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
+	0x6d, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+	0x38, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x72, 0x70, 0x43, 0x69, 0x74, 0x79, 0x54, 0x72, 0x65,
+	0x65, 0x12, 0x10, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x45, 0x6d,
+	0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e,
+	0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0f, 0x47, 0x65, 0x74,
+	0x45, 0x72, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x74,
+	0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43,
+	0x6f, 0x64, 0x65, 0x1a, 0x12, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2e,
+	0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x72,
+	0x70, 0x4d, 0x6b, 0x74, 0x4e, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69,
+	0x6c, 0x54, 0x72, 0x65, 0x65, 0x12, 0x10, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
+	0x6d, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66,
+	0x6f, 0x72, 0x6d, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x62, 0x06, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -570,7 +695,7 @@ func file_transform_proto_rawDescGZIP() []byte {
 	return file_transform_proto_rawDescData
 }
 
-var file_transform_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_transform_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
 var file_transform_proto_goTypes = []interface{}{
 	(*UserRequest)(nil),   // 0: transform.UserRequest
 	(*UserResponse)(nil),  // 1: transform.UserResponse
@@ -580,6 +705,8 @@ var file_transform_proto_goTypes = []interface{}{
 	(*TreeNodes)(nil),     // 5: transform.TreeNodes
 	(*TreeNode)(nil),      // 6: transform.TreeNode
 	(*Tag)(nil),           // 7: transform.Tag
+	(*OptionCode)(nil),    // 8: transform.OptionCode
+	(*Options)(nil),       // 9: transform.Options
 }
 var file_transform_proto_depIdxs = []int32{
 	6, // 0: transform.TreeNodes.nodes:type_name -> transform.TreeNode
@@ -588,11 +715,15 @@ var file_transform_proto_depIdxs = []int32{
 	0, // 3: transform.Transform.GetUser:input_type -> transform.UserRequest
 	2, // 4: transform.Transform.ParseToken:input_type -> transform.TokenRequest
 	4, // 5: transform.Transform.GetErpCityTree:input_type -> transform.Empty
-	1, // 6: transform.Transform.GetUser:output_type -> transform.UserResponse
-	3, // 7: transform.Transform.ParseToken:output_type -> transform.TokenResponse
-	5, // 8: transform.Transform.GetErpCityTree:output_type -> transform.TreeNodes
-	6, // [6:9] is the sub-list for method output_type
-	3, // [3:6] is the sub-list for method input_type
+	8, // 6: transform.Transform.GetErpOptionset:input_type -> transform.OptionCode
+	4, // 7: transform.Transform.GetErpMktNetWorkDetailTree:input_type -> transform.Empty
+	1, // 8: transform.Transform.GetUser:output_type -> transform.UserResponse
+	3, // 9: transform.Transform.ParseToken:output_type -> transform.TokenResponse
+	5, // 10: transform.Transform.GetErpCityTree:output_type -> transform.TreeNodes
+	9, // 11: transform.Transform.GetErpOptionset:output_type -> transform.Options
+	5, // 12: transform.Transform.GetErpMktNetWorkDetailTree:output_type -> transform.TreeNodes
+	8, // [8:13] is the sub-list for method output_type
+	3, // [3:8] is the sub-list for method input_type
 	3, // [3:3] is the sub-list for extension type_name
 	3, // [3:3] is the sub-list for extension extendee
 	0, // [0:3] is the sub-list for field type_name
@@ -700,6 +831,30 @@ func file_transform_proto_init() {
 				return nil
 			}
 		}
+		file_transform_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OptionCode); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_transform_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Options); 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{
@@ -707,7 +862,7 @@ func file_transform_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_transform_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   8,
+			NumMessages:   10,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
@@ -736,6 +891,8 @@ type TransformClient interface {
 	GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
 	ParseToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
 	GetErpCityTree(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TreeNodes, error)
+	GetErpOptionset(ctx context.Context, in *OptionCode, opts ...grpc.CallOption) (*Options, error)
+	GetErpMktNetWorkDetailTree(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TreeNodes, error)
 }
 
 type transformClient struct {
@@ -773,11 +930,31 @@ func (c *transformClient) GetErpCityTree(ctx context.Context, in *Empty, opts ..
 	return out, nil
 }
 
+func (c *transformClient) GetErpOptionset(ctx context.Context, in *OptionCode, opts ...grpc.CallOption) (*Options, error) {
+	out := new(Options)
+	err := c.cc.Invoke(ctx, "/transform.Transform/GetErpOptionset", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *transformClient) GetErpMktNetWorkDetailTree(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TreeNodes, error) {
+	out := new(TreeNodes)
+	err := c.cc.Invoke(ctx, "/transform.Transform/GetErpMktNetWorkDetailTree", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // TransformServer is the server API for Transform service.
 type TransformServer interface {
 	GetUser(context.Context, *UserRequest) (*UserResponse, error)
 	ParseToken(context.Context, *TokenRequest) (*TokenResponse, error)
 	GetErpCityTree(context.Context, *Empty) (*TreeNodes, error)
+	GetErpOptionset(context.Context, *OptionCode) (*Options, error)
+	GetErpMktNetWorkDetailTree(context.Context, *Empty) (*TreeNodes, error)
 }
 
 // UnimplementedTransformServer can be embedded to have forward compatible implementations.
@@ -793,6 +970,12 @@ func (*UnimplementedTransformServer) ParseToken(context.Context, *TokenRequest)
 func (*UnimplementedTransformServer) GetErpCityTree(context.Context, *Empty) (*TreeNodes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetErpCityTree not implemented")
 }
+func (*UnimplementedTransformServer) GetErpOptionset(context.Context, *OptionCode) (*Options, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetErpOptionset not implemented")
+}
+func (*UnimplementedTransformServer) GetErpMktNetWorkDetailTree(context.Context, *Empty) (*TreeNodes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetErpMktNetWorkDetailTree not implemented")
+}
 
 func RegisterTransformServer(s *grpc.Server, srv TransformServer) {
 	s.RegisterService(&_Transform_serviceDesc, srv)
@@ -852,6 +1035,42 @@ func _Transform_GetErpCityTree_Handler(srv interface{}, ctx context.Context, dec
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Transform_GetErpOptionset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(OptionCode)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(TransformServer).GetErpOptionset(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/transform.Transform/GetErpOptionset",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(TransformServer).GetErpOptionset(ctx, req.(*OptionCode))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Transform_GetErpMktNetWorkDetailTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(TransformServer).GetErpMktNetWorkDetailTree(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/transform.Transform/GetErpMktNetWorkDetailTree",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(TransformServer).GetErpMktNetWorkDetailTree(ctx, req.(*Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 var _Transform_serviceDesc = grpc.ServiceDesc{
 	ServiceName: "transform.Transform",
 	HandlerType: (*TransformServer)(nil),
@@ -868,6 +1087,14 @@ var _Transform_serviceDesc = grpc.ServiceDesc{
 			MethodName: "GetErpCityTree",
 			Handler:    _Transform_GetErpCityTree_Handler,
 		},
+		{
+			MethodName: "GetErpOptionset",
+			Handler:    _Transform_GetErpOptionset_Handler,
+		},
+		{
+			MethodName: "GetErpMktNetWorkDetailTree",
+			Handler:    _Transform_GetErpMktNetWorkDetailTree_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "transform.proto",

+ 17 - 3
transformclient/transform.go

@@ -14,19 +14,23 @@ import (
 )
 
 type (
+	Empty         = transform.Empty
 	TreeNodes     = transform.TreeNodes
 	TreeNode      = transform.TreeNode
-	Tag           = transform.Tag
+	OptionCode    = transform.OptionCode
 	UserRequest   = transform.UserRequest
-	UserResponse  = transform.UserResponse
 	TokenRequest  = transform.TokenRequest
+	Tag           = transform.Tag
+	Options       = transform.Options
+	UserResponse  = transform.UserResponse
 	TokenResponse = transform.TokenResponse
-	Empty         = transform.Empty
 
 	Transform interface {
 		GetUser(ctx context.Context, in *UserRequest) (*UserResponse, error)
 		ParseToken(ctx context.Context, in *TokenRequest) (*TokenResponse, error)
 		GetErpCityTree(ctx context.Context, in *Empty) (*TreeNodes, error)
+		GetErpOptionset(ctx context.Context, in *OptionCode) (*Options, error)
+		GetErpMktNetWorkDetailTree(ctx context.Context, in *Empty) (*TreeNodes, error)
 	}
 
 	defaultTransform struct {
@@ -54,3 +58,13 @@ func (m *defaultTransform) GetErpCityTree(ctx context.Context, in *Empty) (*Tree
 	client := transform.NewTransformClient(m.cli.Conn())
 	return client.GetErpCityTree(ctx, in)
 }
+
+func (m *defaultTransform) GetErpOptionset(ctx context.Context, in *OptionCode) (*Options, error) {
+	client := transform.NewTransformClient(m.cli.Conn())
+	return client.GetErpOptionset(ctx, in)
+}
+
+func (m *defaultTransform) GetErpMktNetWorkDetailTree(ctx context.Context, in *Empty) (*TreeNodes, error) {
+	client := transform.NewTransformClient(m.cli.Conn())
+	return client.GetErpMktNetWorkDetailTree(ctx, in)
+}