diff --git a/app/pb/mq/mq.pb.go b/app/pb/mq/mq.pb.go index e0e12b2..2620b4c 100644 --- a/app/pb/mq/mq.pb.go +++ b/app/pb/mq/mq.pb.go @@ -21,58 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Platform int32 - -const ( - Platform_bilibili Platform = 0 // B站 - Platform_huya Platform = 1 // 虎牙 - Platform_douyu Platform = 2 // 斗鱼 - Platform_douyin Platform = 3 // 抖音 -) - -// Enum value maps for Platform. -var ( - Platform_name = map[int32]string{ - 0: "bilibili", - 1: "huya", - 2: "douyu", - 3: "douyin", - } - Platform_value = map[string]int32{ - "bilibili": 0, - "huya": 1, - "douyu": 2, - "douyin": 3, - } -) - -func (x Platform) Enum() *Platform { - p := new(Platform) - *p = x - return p -} - -func (x Platform) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Platform) Descriptor() protoreflect.EnumDescriptor { - return file_mq_mq_proto_enumTypes[0].Descriptor() -} - -func (Platform) Type() protoreflect.EnumType { - return &file_mq_mq_proto_enumTypes[0] -} - -func (x Platform) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Platform.Descriptor instead. -func (Platform) EnumDescriptor() ([]byte, []int) { - return file_mq_mq_proto_rawDescGZIP(), []int{0} -} - type MqNobilityBuy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -814,11 +762,8 @@ var file_mq_mq_proto_rawDesc = []byte{ 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x2a, 0x39, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0c, 0x0a, 0x08, - 0x62, 0x69, 0x6c, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x68, 0x75, - 0x79, 0x61, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x64, 0x6f, 0x75, 0x79, 0x75, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x79, 0x69, 0x6e, 0x10, 0x03, 0x42, 0x07, 0x5a, 0x05, 0x2f, - 0x70, 0x62, 0x4d, 0x71, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x07, 0x5a, 0x05, 0x2f, 0x70, 0x62, 0x4d, 0x71, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -833,19 +778,17 @@ func file_mq_mq_proto_rawDescGZIP() []byte { return file_mq_mq_proto_rawDescData } -var file_mq_mq_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_mq_mq_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_mq_mq_proto_goTypes = []interface{}{ - (Platform)(0), // 0: pb.Platform - (*MqNobilityBuy)(nil), // 1: pb.MqNobilityBuy - (*MqDanmaku)(nil), // 2: pb.MqDanmaku - (*MqGift)(nil), // 3: pb.MqGift - (*MqRewardPool)(nil), // 4: pb.MqRewardPool - (*MqUserCoinChanged)(nil), // 5: pb.MqUserCoinChanged - (vars.UserCoinChangedReason)(0), // 6: pb.vars.UserCoinChangedReason + (*MqNobilityBuy)(nil), // 0: pb.MqNobilityBuy + (*MqDanmaku)(nil), // 1: pb.MqDanmaku + (*MqGift)(nil), // 2: pb.MqGift + (*MqRewardPool)(nil), // 3: pb.MqRewardPool + (*MqUserCoinChanged)(nil), // 4: pb.MqUserCoinChanged + (vars.UserCoinChangedReason)(0), // 5: pb.vars.UserCoinChangedReason } var file_mq_mq_proto_depIdxs = []int32{ - 6, // 0: pb.MqUserCoinChanged.reason:type_name -> pb.vars.UserCoinChangedReason + 5, // 0: pb.MqUserCoinChanged.reason:type_name -> pb.vars.UserCoinChangedReason 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -925,14 +868,13 @@ func file_mq_mq_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mq_mq_proto_rawDesc, - NumEnums: 1, + NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, GoTypes: file_mq_mq_proto_goTypes, DependencyIndexes: file_mq_mq_proto_depIdxs, - EnumInfos: file_mq_mq_proto_enumTypes, MessageInfos: file_mq_mq_proto_msgTypes, }.Build() File_mq_mq_proto = out.File diff --git a/app/pb/mq/mq.proto b/app/pb/mq/mq.proto index 00691f4..fdd9219 100644 --- a/app/pb/mq/mq.proto +++ b/app/pb/mq/mq.proto @@ -6,13 +6,6 @@ import "vars/vars.proto"; option go_package = "/pbMq"; -enum Platform { - bilibili = 0; // B站 - huya = 1; // 虎牙 - douyu = 2; // 斗鱼 - douyin = 3; // 抖音 -} - message MqNobilityBuy { string platform = 1; // 平台 int64 liveRoomId = 2; // 直播间ID diff --git a/app/pb/vars/vars.pb.go b/app/pb/vars/vars.pb.go index ded2ffc..2c3806b 100644 --- a/app/pb/vars/vars.pb.go +++ b/app/pb/vars/vars.pb.go @@ -20,6 +20,58 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type Platform int32 + +const ( + Platform_Bilibili Platform = 0 // B站 + Platform_Huya Platform = 1 // 虎牙 + Platform_Douyu Platform = 2 // 斗鱼 + Platform_Tiktok Platform = 3 // 抖音 +) + +// Enum value maps for Platform. +var ( + Platform_name = map[int32]string{ + 0: "Bilibili", + 1: "Huya", + 2: "Douyu", + 3: "Tiktok", + } + Platform_value = map[string]int32{ + "Bilibili": 0, + "Huya": 1, + "Douyu": 2, + "Tiktok": 3, + } +) + +func (x Platform) Enum() *Platform { + p := new(Platform) + *p = x + return p +} + +func (x Platform) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Platform) Descriptor() protoreflect.EnumDescriptor { + return file_vars_vars_proto_enumTypes[0].Descriptor() +} + +func (Platform) Type() protoreflect.EnumType { + return &file_vars_vars_proto_enumTypes[0] +} + +func (x Platform) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Platform.Descriptor instead. +func (Platform) EnumDescriptor() ([]byte, []int) { + return file_vars_vars_proto_rawDescGZIP(), []int{0} +} + type UserCoinChangedReason int32 const ( @@ -82,11 +134,11 @@ func (x UserCoinChangedReason) String() string { } func (UserCoinChangedReason) Descriptor() protoreflect.EnumDescriptor { - return file_vars_vars_proto_enumTypes[0].Descriptor() + return file_vars_vars_proto_enumTypes[1].Descriptor() } func (UserCoinChangedReason) Type() protoreflect.EnumType { - return &file_vars_vars_proto_enumTypes[0] + return &file_vars_vars_proto_enumTypes[1] } func (x UserCoinChangedReason) Number() protoreflect.EnumNumber { @@ -95,7 +147,7 @@ func (x UserCoinChangedReason) Number() protoreflect.EnumNumber { // Deprecated: Use UserCoinChangedReason.Descriptor instead. func (UserCoinChangedReason) EnumDescriptor() ([]byte, []int) { - return file_vars_vars_proto_rawDescGZIP(), []int{0} + return file_vars_vars_proto_rawDescGZIP(), []int{1} } type Goods int32 @@ -128,11 +180,11 @@ func (x Goods) String() string { } func (Goods) Descriptor() protoreflect.EnumDescriptor { - return file_vars_vars_proto_enumTypes[1].Descriptor() + return file_vars_vars_proto_enumTypes[2].Descriptor() } func (Goods) Type() protoreflect.EnumType { - return &file_vars_vars_proto_enumTypes[1] + return &file_vars_vars_proto_enumTypes[2] } func (x Goods) Number() protoreflect.EnumNumber { @@ -141,7 +193,7 @@ func (x Goods) Number() protoreflect.EnumNumber { // Deprecated: Use Goods.Descriptor instead. func (Goods) EnumDescriptor() ([]byte, []int) { - return file_vars_vars_proto_rawDescGZIP(), []int{1} + return file_vars_vars_proto_rawDescGZIP(), []int{2} } type RankType int32 @@ -207,11 +259,11 @@ func (x RankType) String() string { } func (RankType) Descriptor() protoreflect.EnumDescriptor { - return file_vars_vars_proto_enumTypes[2].Descriptor() + return file_vars_vars_proto_enumTypes[3].Descriptor() } func (RankType) Type() protoreflect.EnumType { - return &file_vars_vars_proto_enumTypes[2] + return &file_vars_vars_proto_enumTypes[3] } func (x RankType) Number() protoreflect.EnumNumber { @@ -220,44 +272,47 @@ func (x RankType) Number() protoreflect.EnumNumber { // Deprecated: Use RankType.Descriptor instead. func (RankType) EnumDescriptor() ([]byte, []int) { - return file_vars_vars_proto_rawDescGZIP(), []int{2} + return file_vars_vars_proto_rawDescGZIP(), []int{3} } var File_vars_vars_proto protoreflect.FileDescriptor var file_vars_vars_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x07, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2a, 0xc8, 0x01, 0x0a, 0x15, 0x55, - 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x61, 0x79, 0x10, 0x00, 0x12, 0x11, 0x0a, - 0x0d, 0x42, 0x75, 0x79, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x6f, 0x64, 0x10, 0x01, - 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, - 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x03, - 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x10, 0x04, 0x12, 0x0f, - 0x0a, 0x0b, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x10, 0x05, 0x12, - 0x10, 0x0a, 0x0c, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x10, - 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x10, 0x0b, 0x12, 0x13, - 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x10, 0x14, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x10, 0x1e, 0x2a, 0x1d, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x09, - 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6c, 0x69, - 0x74, 0x65, 0x10, 0x01, 0x2a, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, - 0x0a, 0x06, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, - 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x6c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x6c, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, - 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, - 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x10, 0x08, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, - 0x04, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, - 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, - 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0c, 0x42, 0x21, 0x5a, 0x1f, 0x6c, 0x69, 0x76, - 0x65, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x62, - 0x2f, 0x76, 0x61, 0x72, 0x73, 0x3b, 0x70, 0x62, 0x56, 0x61, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x12, 0x07, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2a, 0x39, 0x0a, 0x08, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x69, 0x6c, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x75, 0x79, 0x61, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x44, 0x6f, 0x75, 0x79, 0x75, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x69, 0x6b, + 0x74, 0x6f, 0x6b, 0x10, 0x03, 0x2a, 0xc8, 0x01, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, + 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x07, 0x0a, 0x03, 0x50, 0x61, 0x79, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x75, 0x79, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, + 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x02, 0x12, 0x0c, 0x0a, + 0x08, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, + 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x75, 0x79, + 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x72, + 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x10, 0x14, 0x12, 0x12, + 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x64, + 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x10, 0x1e, + 0x2a, 0x1d, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x69, 0x74, + 0x6c, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x10, 0x01, 0x2a, + 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x61, 0x6d, + 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, + 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x04, 0x12, + 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x05, 0x12, 0x0e, 0x0a, + 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x06, 0x12, 0x0e, 0x0a, + 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x07, 0x12, 0x10, 0x0a, + 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x08, 0x12, + 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, 0x73, 0x74, + 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, + 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, + 0x6f, 0x64, 0x10, 0x0c, 0x42, 0x21, 0x5a, 0x1f, 0x6c, 0x69, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x61, 0x72, 0x73, + 0x3b, 0x70, 0x62, 0x56, 0x61, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -272,11 +327,12 @@ func file_vars_vars_proto_rawDescGZIP() []byte { return file_vars_vars_proto_rawDescData } -var file_vars_vars_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_vars_vars_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_vars_vars_proto_goTypes = []interface{}{ - (UserCoinChangedReason)(0), // 0: pb.vars.UserCoinChangedReason - (Goods)(0), // 1: pb.vars.Goods - (RankType)(0), // 2: pb.vars.RankType + (Platform)(0), // 0: pb.vars.Platform + (UserCoinChangedReason)(0), // 1: pb.vars.UserCoinChangedReason + (Goods)(0), // 2: pb.vars.Goods + (RankType)(0), // 3: pb.vars.RankType } var file_vars_vars_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -296,7 +352,7 @@ func file_vars_vars_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vars_vars_proto_rawDesc, - NumEnums: 3, + NumEnums: 4, NumMessages: 0, NumExtensions: 0, NumServices: 0, diff --git a/app/pb/vars/vars.proto b/app/pb/vars/vars.proto index 4ce512e..ddf6fb0 100644 --- a/app/pb/vars/vars.proto +++ b/app/pb/vars/vars.proto @@ -4,6 +4,13 @@ package pb.vars; option go_package = "live-service/app/pb/vars;pbVars"; +enum Platform { + Bilibili = 0; // B站 + Huya = 1; // 虎牙 + Douyu = 2; // 斗鱼 + Tiktok = 3; // 抖音 +} + enum UserCoinChangedReason { ///// 消费 Pay = 0; // 通用消费 diff --git a/app/user_center/rpc/etc/user_center-dev.yaml b/app/user_center/rpc/etc/user_center-dev.yaml index d95ff7b..dfccae6 100644 --- a/app/user_center/rpc/etc/user_center-dev.yaml +++ b/app/user_center/rpc/etc/user_center-dev.yaml @@ -1,6 +1,6 @@ Name: usercenter.rpc ListenOn: 127.0.0.1:40001 -Timeout: 5000 +Timeout: 8000 Mode: dev Etcd: Hosts: @@ -29,8 +29,8 @@ UserRetriever: UpdateDuration: 720 # 720 hours = 30 Day = 1 Month NobilityPlatforms: [ "bilibili" ] # 需要获取贵族的平台列表 Cron: - PlatformUser: "0 0/5 * * * ?" # 每隔5分钟执行一次 - Nobility: "0 0/10 * * * ?" # 每隔10分钟执行一次 + PlatformUser: "0 0/1 * * * ?" # 每隔1分钟执行一次 + Nobility: "0 0/59 * * * ?" # 每隔59分钟执行一次 Bilibili: RoomId: 6925399 # Mid: 6704420 diff --git a/app/user_center/rpc/etc/user_center.yaml b/app/user_center/rpc/etc/user_center.yaml index 99dadbf..8132bd3 100644 --- a/app/user_center/rpc/etc/user_center.yaml +++ b/app/user_center/rpc/etc/user_center.yaml @@ -1,6 +1,6 @@ Name: usercenter.rpc ListenOn: 127.0.0.1:10001 -Timeout: 5000 +Timeout: 8000 Mode: dev Etcd: Hosts: @@ -30,8 +30,8 @@ UserRetriever: UpdateDuration: 720 # 720 hours = 30 Day = 1 Month NobilityPlatforms: [ "bilibili" ] # 需要获取贵族的平台列表 Cron: - PlatformUser: "0 0/5 * * * ?" # 每隔5分钟执行一次 - Nobility: "0 0/10 * * * ?" # 每隔10分钟执行一次 + PlatformUser: "0 0/1 * * * ?" # 每隔1分钟执行一次 + Nobility: "0 0/59 * * * ?" # 每隔59分钟执行一次 Bilibili: RoomId: 6925399 # Mid: 6704420 @@ -97,6 +97,13 @@ Coin: # 平台免费礼物到弹币的转换 FreeToCoin: bilibili: 0.01 # 价值1毛 +Grade: + BravePointCost: [0,300,320,350,400,450,500,600,800,1000] + MaxBravePoint: 3000 + WinScoreThreshold: 18 + MinUserCount: 4 + ProtectedGradeThreshold: 2 + ProtectedGradeLost: 1 Elite: LiveDict: { "1": "0", "2": "1001", "3": "1002" } DefaultId: 0 @@ -109,6 +116,10 @@ Elite: Sort: 3 PriceDay: 60 PriceForever: 18888 + - Id: 1003 + Sort: 4 + PriceDay: 65 + PriceForever: 18888 Title: LiveDict: { "1": "2000" } Items: @@ -133,6 +144,9 @@ Title: - Id: 6 Name: 群萌新 Type: custom + - Id: 7 + Name: 白马义从 + Type: custom - Id: 1000 Name: 军神 # 名将榜首 Type: grade diff --git a/app/user_center/rpc/internal/logic/gift_collect/collector.go b/app/user_center/rpc/internal/logic/gift_collect/collector.go index b7b18bb..1dc7878 100644 --- a/app/user_center/rpc/internal/logic/gift_collect/collector.go +++ b/app/user_center/rpc/internal/logic/gift_collect/collector.go @@ -4,7 +4,7 @@ import ( "context" "github.com/robfig/cron/v3" "github.com/zeromicro/go-zero/core/logx" - pbMq "live-service/app/pb/mq" + pbVars "live-service/app/pb/vars" "live-service/app/user_center/rpc/internal/svc" ) @@ -40,7 +40,7 @@ func InitCollector(svcCtx *svc.ServiceContext) { svcCtx: svcCtx, cron: cron.New(cron.WithSeconds()), collectorMapper: map[string]CollectorFunc{ - pbMq.Platform_name[int32(pbMq.Platform_bilibili)]: GiftCollectorBilibili, + pbVars.Platform_name[int32(pbVars.Platform_Bilibili)]: GiftCollectorBilibili, }, Logger: logx.WithContext(ctx), } diff --git a/app/user_center/rpc/internal/logic/platform_user/platform_user_retrieve.go b/app/user_center/rpc/internal/logic/platform_user/platform_user_retrieve.go index 4f4be0c..d65f719 100644 --- a/app/user_center/rpc/internal/logic/platform_user/platform_user_retrieve.go +++ b/app/user_center/rpc/internal/logic/platform_user/platform_user_retrieve.go @@ -4,7 +4,7 @@ import ( "context" "github.com/robfig/cron/v3" "github.com/zeromicro/go-zero/core/logx" - pbMq "live-service/app/pb/mq" + pbVars "live-service/app/pb/vars" "live-service/app/user_center/model" "live-service/app/user_center/rpc/internal/svc" "strconv" @@ -50,10 +50,10 @@ func InitUserRetriever(svcCtx *svc.ServiceContext) { ctx: ctx, svcCtx: svcCtx, platformRetrieverMapper: map[string]RetrieveFunc{ - pbMq.Platform_name[int32(pbMq.Platform_bilibili)]: RetrieveBilibili, + pbVars.Platform_name[int32(pbVars.Platform_Bilibili)]: RetrieveBilibili, }, nobilityMapper: map[string]NobilityFunc{ - pbMq.Platform_name[int32(pbMq.Platform_bilibili)]: NobilityBilibili, + pbVars.Platform_name[int32(pbVars.Platform_Bilibili)]: NobilityBilibili, }, Logger: logx.WithContext(ctx), }