diff --git a/etcd/keyconf.go b/etcd/keyconf.go index 7f987f9..b32b797 100644 --- a/etcd/keyconf.go +++ b/etcd/keyconf.go @@ -37,4 +37,5 @@ const ( ETCDKEY_Item = "/game/item" // 道具列表 ETCDKEY_SKin = "/game/skin_config" // 皮肤配置 ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置 + ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录 ) diff --git a/model/awardlog.go b/model/awardlog.go index 8959d0f..73d0904 100644 --- a/model/awardlog.go +++ b/model/awardlog.go @@ -9,7 +9,7 @@ import ( type AwardLog struct { Platform string - AwardMap map[int32]map[int32]int32 //key:itemId value:num + AwardMap map[int32]map[int32]int32 //key1:1话费 2实物 key2 itemId value:数量 Ts time.Time } diff --git a/model/config.go b/model/config.go index b2cacd6..ac8fe99 100644 --- a/model/config.go +++ b/model/config.go @@ -132,6 +132,8 @@ type AllConfig struct { *webapi.SkinConfig //排行榜配置 *webapi.RankTypeConfig + //获奖记录配置 + *webapi.AwardLogConfig } type GlobalConfig struct { diff --git a/protocol/player/player.pb.go b/protocol/player/player.pb.go index 026a854..19a572c 100644 --- a/protocol/player/player.pb.go +++ b/protocol/player/player.pb.go @@ -10190,7 +10190,7 @@ type SCAwardLog struct { unknownFields protoimpl.UnknownFields TypeId int32 `protobuf:"varint,1,opt,name=typeId,proto3" json:"typeId,omitempty"` //1-话费 2-实物 - AwardLog []*AwardLogInfo `protobuf:"bytes,2,rep,name=AwardLog,proto3" json:"AwardLog,omitempty"` + AwardLog *AwardLogData `protobuf:"bytes,2,opt,name=AwardLog,proto3" json:"AwardLog,omitempty"` AnnouncerLog []*AnnouncerLogInfo `protobuf:"bytes,3,rep,name=AnnouncerLog,proto3" json:"AnnouncerLog,omitempty"` } @@ -10233,7 +10233,7 @@ func (x *SCAwardLog) GetTypeId() int32 { return 0 } -func (x *SCAwardLog) GetAwardLog() []*AwardLogInfo { +func (x *SCAwardLog) GetAwardLog() *AwardLogData { if x != nil { return x.AwardLog } @@ -10247,6 +10247,61 @@ func (x *SCAwardLog) GetAnnouncerLog() []*AnnouncerLogInfo { return nil } +type AwardLogData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //排序類型 1-数量 2-序号 + AwardLog []*AwardLogInfo `protobuf:"bytes,2,rep,name=AwardLog,proto3" json:"AwardLog,omitempty"` +} + +func (x *AwardLogData) Reset() { + *x = AwardLogData{} + if protoimpl.UnsafeEnabled { + mi := &file_player_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AwardLogData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwardLogData) ProtoMessage() {} + +func (x *AwardLogData) ProtoReflect() protoreflect.Message { + mi := &file_player_proto_msgTypes[147] + 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 AwardLogData.ProtoReflect.Descriptor instead. +func (*AwardLogData) Descriptor() ([]byte, []int) { + return file_player_proto_rawDescGZIP(), []int{147} +} + +func (x *AwardLogData) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +func (x *AwardLogData) GetAwardLog() []*AwardLogInfo { + if x != nil { + return x.AwardLog + } + return nil +} + type AwardLogInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -10254,12 +10309,13 @@ type AwardLogInfo struct { ItemId int32 `protobuf:"varint,1,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //道具ID Num int64 `protobuf:"varint,2,opt,name=Num,proto3" json:"Num,omitempty"` //数量 + Order int32 `protobuf:"varint,3,opt,name=Order,proto3" json:"Order,omitempty"` //序号 } func (x *AwardLogInfo) Reset() { *x = AwardLogInfo{} if protoimpl.UnsafeEnabled { - mi := &file_player_proto_msgTypes[147] + mi := &file_player_proto_msgTypes[148] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10272,7 +10328,7 @@ func (x *AwardLogInfo) String() string { func (*AwardLogInfo) ProtoMessage() {} func (x *AwardLogInfo) ProtoReflect() protoreflect.Message { - mi := &file_player_proto_msgTypes[147] + mi := &file_player_proto_msgTypes[148] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10285,7 +10341,7 @@ func (x *AwardLogInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AwardLogInfo.ProtoReflect.Descriptor instead. func (*AwardLogInfo) Descriptor() ([]byte, []int) { - return file_player_proto_rawDescGZIP(), []int{147} + return file_player_proto_rawDescGZIP(), []int{148} } func (x *AwardLogInfo) GetItemId() int32 { @@ -10302,6 +10358,13 @@ func (x *AwardLogInfo) GetNum() int64 { return 0 } +func (x *AwardLogInfo) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + //实时播报 type AnnouncerLogInfo struct { state protoimpl.MessageState @@ -10318,7 +10381,7 @@ type AnnouncerLogInfo struct { func (x *AnnouncerLogInfo) Reset() { *x = AnnouncerLogInfo{} if protoimpl.UnsafeEnabled { - mi := &file_player_proto_msgTypes[148] + mi := &file_player_proto_msgTypes[149] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10331,7 +10394,7 @@ func (x *AnnouncerLogInfo) String() string { func (*AnnouncerLogInfo) ProtoMessage() {} func (x *AnnouncerLogInfo) ProtoReflect() protoreflect.Message { - mi := &file_player_proto_msgTypes[148] + mi := &file_player_proto_msgTypes[149] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10344,7 +10407,7 @@ func (x *AnnouncerLogInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AnnouncerLogInfo.ProtoReflect.Descriptor instead. func (*AnnouncerLogInfo) Descriptor() ([]byte, []int) { - return file_player_proto_rawDescGZIP(), []int{148} + return file_player_proto_rawDescGZIP(), []int{149} } func (x *AnnouncerLogInfo) GetSnid() int32 { @@ -11413,17 +11476,24 @@ var file_player_proto_rawDesc = []byte{ 0x22, 0x94, 0x01, 0x0a, 0x0a, 0x53, 0x43, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, - 0x4c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x4c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x3c, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, - 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x22, 0x38, 0x0a, 0x0c, 0x41, 0x77, 0x61, 0x72, 0x64, - 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, - 0x6d, 0x22, 0x80, 0x01, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, + 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x22, 0x58, 0x0a, 0x0c, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, + 0x30, 0x0a, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, + 0x67, 0x22, 0x4e, 0x0a, 0x0c, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x22, 0x80, 0x01, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, @@ -11810,7 +11880,7 @@ func file_player_proto_rawDescGZIP() []byte { } var file_player_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_player_proto_msgTypes = make([]protoimpl.MessageInfo, 153) +var file_player_proto_msgTypes = make([]protoimpl.MessageInfo, 154) var file_player_proto_goTypes = []interface{}{ (OpResultCode)(0), // 0: player.OpResultCode (PlayerPacketID)(0), // 1: player.PlayerPacketID @@ -11961,23 +12031,24 @@ var file_player_proto_goTypes = []interface{}{ (*SCItem)(nil), // 146: player.SCItem (*CS_AwardLog)(nil), // 147: player.CS_AwardLog (*SCAwardLog)(nil), // 148: player.SCAwardLog - (*AwardLogInfo)(nil), // 149: player.AwardLogInfo - (*AnnouncerLogInfo)(nil), // 150: player.AnnouncerLogInfo - nil, // 151: player.PlayerData.RankScoreEntry - nil, // 152: player.SCPlayerDataUpdate.RankScoreEntry - nil, // 153: player.SCGameExDropItems.ItemsEntry - nil, // 154: player.SCBindTelInfo.BindTelRewardEntry - (*server.DB_GameItem)(nil), // 155: server.DB_GameItem + (*AwardLogData)(nil), // 149: player.AwardLogData + (*AwardLogInfo)(nil), // 150: player.AwardLogInfo + (*AnnouncerLogInfo)(nil), // 151: player.AnnouncerLogInfo + nil, // 152: player.PlayerData.RankScoreEntry + nil, // 153: player.SCPlayerDataUpdate.RankScoreEntry + nil, // 154: player.SCGameExDropItems.ItemsEntry + nil, // 155: player.SCBindTelInfo.BindTelRewardEntry + (*server.DB_GameItem)(nil), // 156: server.DB_GameItem } var file_player_proto_depIdxs = []int32{ 4, // 0: player.SCBillList.Items:type_name -> player.BillItem 0, // 1: player.SCSavePlayerInfo.OpRetCode:type_name -> player.OpResultCode - 151, // 2: player.PlayerData.RankScore:type_name -> player.PlayerData.RankScoreEntry + 152, // 2: player.PlayerData.RankScore:type_name -> player.PlayerData.RankScoreEntry 9, // 3: player.PlayerData.WeekCard:type_name -> player.WeekInfo 0, // 4: player.SCPlayerData.OpRetCode:type_name -> player.OpResultCode 8, // 5: player.SCPlayerData.Data:type_name -> player.PlayerData 10, // 6: player.SCPlayerData.MiniGameArr:type_name -> player.MiniGameInfo - 152, // 7: player.SCPlayerDataUpdate.RankScore:type_name -> player.SCPlayerDataUpdate.RankScoreEntry + 153, // 7: player.SCPlayerDataUpdate.RankScore:type_name -> player.SCPlayerDataUpdate.RankScoreEntry 8, // 8: player.SCThirdPlayerData.Data:type_name -> player.PlayerData 0, // 9: player.SCChangeNick.OpRetCode:type_name -> player.OpResultCode 0, // 10: player.SCChangePassword.OpRetCode:type_name -> player.OpResultCode @@ -12014,7 +12085,7 @@ var file_player_proto_depIdxs = []int32{ 93, // 41: player.JybInfoAward.ItemId:type_name -> player.ItemInfo 0, // 42: player.SCPlayerSetting.OpRetCode:type_name -> player.OpResultCode 94, // 43: player.SCPlayerSetting.GainItem:type_name -> player.JybInfoAward - 153, // 44: player.SCGameExDropItems.Items:type_name -> player.SCGameExDropItems.ItemsEntry + 154, // 44: player.SCGameExDropItems.Items:type_name -> player.SCGameExDropItems.ItemsEntry 0, // 45: player.SCVIPBuy.OpRetCode:type_name -> player.OpResultCode 0, // 46: player.SCVIPDraw.OpRetCode:type_name -> player.OpResultCode 93, // 47: player.VIPcfg.Item:type_name -> player.ItemInfo @@ -12023,7 +12094,7 @@ var file_player_proto_depIdxs = []int32{ 103, // 50: player.SCVIPInfo.List:type_name -> player.VIPcfg 108, // 51: player.SCPayGoodsInfo.Item:type_name -> player.PayItem 0, // 52: player.SCClientLog.OpRetCode:type_name -> player.OpResultCode - 154, // 53: player.SCBindTelInfo.BindTelReward:type_name -> player.SCBindTelInfo.BindTelRewardEntry + 155, // 53: player.SCBindTelInfo.BindTelReward:type_name -> player.SCBindTelInfo.BindTelRewardEntry 0, // 54: player.SCPlayerSMSCode.Code:type_name -> player.OpResultCode 0, // 55: player.SCBindTel.Code:type_name -> player.OpResultCode 0, // 56: player.SCHttpPass.OpRetCode:type_name -> player.OpResultCode @@ -12036,14 +12107,15 @@ var file_player_proto_depIdxs = []int32{ 128, // 63: player.SCDiamondLotteryInfo.Item:type_name -> player.LotteryItem 128, // 64: player.SCDiamondLottery.Item:type_name -> player.LotteryItem 128, // 65: player.SCDiamondLotteryLuckyAward.Item:type_name -> player.LotteryItem - 155, // 66: player.SCItem.Items:type_name -> server.DB_GameItem - 149, // 67: player.SCAwardLog.AwardLog:type_name -> player.AwardLogInfo - 150, // 68: player.SCAwardLog.AnnouncerLog:type_name -> player.AnnouncerLogInfo - 69, // [69:69] is the sub-list for method output_type - 69, // [69:69] is the sub-list for method input_type - 69, // [69:69] is the sub-list for extension type_name - 69, // [69:69] is the sub-list for extension extendee - 0, // [0:69] is the sub-list for field type_name + 156, // 66: player.SCItem.Items:type_name -> server.DB_GameItem + 149, // 67: player.SCAwardLog.AwardLog:type_name -> player.AwardLogData + 151, // 68: player.SCAwardLog.AnnouncerLog:type_name -> player.AnnouncerLogInfo + 150, // 69: player.AwardLogData.AwardLog:type_name -> player.AwardLogInfo + 70, // [70:70] is the sub-list for method output_type + 70, // [70:70] is the sub-list for method input_type + 70, // [70:70] is the sub-list for extension type_name + 70, // [70:70] is the sub-list for extension extendee + 0, // [0:70] is the sub-list for field type_name } func init() { file_player_proto_init() } @@ -13817,7 +13889,7 @@ func file_player_proto_init() { } } file_player_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AwardLogInfo); i { + switch v := v.(*AwardLogData); i { case 0: return &v.state case 1: @@ -13829,6 +13901,18 @@ func file_player_proto_init() { } } file_player_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AwardLogInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_player_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnnouncerLogInfo); i { case 0: return &v.state @@ -13847,7 +13931,7 @@ func file_player_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_player_proto_rawDesc, NumEnums: 2, - NumMessages: 153, + NumMessages: 154, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/player/player.proto b/protocol/player/player.proto index 1cc893b..7c46c66 100644 --- a/protocol/player/player.proto +++ b/protocol/player/player.proto @@ -1273,12 +1273,17 @@ message CS_AwardLog{ //PACKET_SCAwardLog message SCAwardLog{ int32 typeId = 1; //1-话费 2-实物 - repeated AwardLogInfo AwardLog =2; + AwardLogData AwardLog =2; repeated AnnouncerLogInfo AnnouncerLog = 3; } +message AwardLogData{ + int32 TypeId = 1; //排序類型 1-数量 2-序号 + repeated AwardLogInfo AwardLog =2; +} message AwardLogInfo{ int32 ItemId = 1; //道具ID int64 Num = 2; //数量 + int32 Order = 3;//序号 } //实时播报 message AnnouncerLogInfo{ diff --git a/protocol/webapi/common.pb.go b/protocol/webapi/common.pb.go index 413d58f..9f83fd8 100644 --- a/protocol/webapi/common.pb.go +++ b/protocol/webapi/common.pb.go @@ -7785,8 +7785,9 @@ type AwardLogConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AwardLog []*AwardLogInfo `protobuf:"bytes,1,rep,name=AwardLog,proto3" json:"AwardLog,omitempty"` - AnnouncerLog []*AnnouncerLogInfo `protobuf:"bytes,2,rep,name=AnnouncerLog,proto3" json:"AnnouncerLog,omitempty"` + Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台 + AwardLog *AwardLogData `protobuf:"bytes,2,opt,name=AwardLog,proto3" json:"AwardLog,omitempty"` + AnnouncerLog []*AnnouncerLogInfo `protobuf:"bytes,3,rep,name=AnnouncerLog,proto3" json:"AnnouncerLog,omitempty"` } func (x *AwardLogConfig) Reset() { @@ -7821,7 +7822,14 @@ func (*AwardLogConfig) Descriptor() ([]byte, []int) { return file_common_proto_rawDescGZIP(), []int{81} } -func (x *AwardLogConfig) GetAwardLog() []*AwardLogInfo { +func (x *AwardLogConfig) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *AwardLogConfig) GetAwardLog() *AwardLogData { if x != nil { return x.AwardLog } @@ -7835,6 +7843,61 @@ func (x *AwardLogConfig) GetAnnouncerLog() []*AnnouncerLogInfo { return nil } +type AwardLogData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //排序類型 1-数量 2-序号 + AwardLog []*AwardLogInfo `protobuf:"bytes,2,rep,name=AwardLog,proto3" json:"AwardLog,omitempty"` +} + +func (x *AwardLogData) Reset() { + *x = AwardLogData{} + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AwardLogData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwardLogData) ProtoMessage() {} + +func (x *AwardLogData) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[82] + 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 AwardLogData.ProtoReflect.Descriptor instead. +func (*AwardLogData) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{82} +} + +func (x *AwardLogData) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +func (x *AwardLogData) GetAwardLog() []*AwardLogInfo { + if x != nil { + return x.AwardLog + } + return nil +} + type AwardLogInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7844,12 +7907,13 @@ type AwardLogInfo struct { ItemId int32 `protobuf:"varint,2,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //道具ID Num int64 `protobuf:"varint,4,opt,name=Num,proto3" json:"Num,omitempty"` //数量 Url string `protobuf:"bytes,5,opt,name=Url,proto3" json:"Url,omitempty"` //话费icon + Order int32 `protobuf:"varint,6,opt,name=Order,proto3" json:"Order,omitempty"` //序号 } func (x *AwardLogInfo) Reset() { *x = AwardLogInfo{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[82] + mi := &file_common_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7862,7 +7926,7 @@ func (x *AwardLogInfo) String() string { func (*AwardLogInfo) ProtoMessage() {} func (x *AwardLogInfo) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[82] + mi := &file_common_proto_msgTypes[83] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7875,7 +7939,7 @@ func (x *AwardLogInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AwardLogInfo.ProtoReflect.Descriptor instead. func (*AwardLogInfo) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{82} + return file_common_proto_rawDescGZIP(), []int{83} } func (x *AwardLogInfo) GetTypeId() int32 { @@ -7906,6 +7970,13 @@ func (x *AwardLogInfo) GetUrl() string { return "" } +func (x *AwardLogInfo) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + //实时播报 type AnnouncerLogInfo struct { state protoimpl.MessageState @@ -7914,7 +7985,7 @@ type AnnouncerLogInfo struct { Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` //玩家ID Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` //玩家名字 - Phone int32 `protobuf:"varint,3,opt,name=Phone,proto3" json:"Phone,omitempty"` //电话 + Phone string `protobuf:"bytes,3,opt,name=Phone,proto3" json:"Phone,omitempty"` //电话 ItemId int32 `protobuf:"varint,4,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //获得物品ID TypeId int32 `protobuf:"varint,5,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-话费 2-实物 } @@ -7922,7 +7993,7 @@ type AnnouncerLogInfo struct { func (x *AnnouncerLogInfo) Reset() { *x = AnnouncerLogInfo{} if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[83] + mi := &file_common_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7935,7 +8006,7 @@ func (x *AnnouncerLogInfo) String() string { func (*AnnouncerLogInfo) ProtoMessage() {} func (x *AnnouncerLogInfo) ProtoReflect() protoreflect.Message { - mi := &file_common_proto_msgTypes[83] + mi := &file_common_proto_msgTypes[84] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7948,7 +8019,7 @@ func (x *AnnouncerLogInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AnnouncerLogInfo.ProtoReflect.Descriptor instead. func (*AnnouncerLogInfo) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{83} + return file_common_proto_rawDescGZIP(), []int{84} } func (x *AnnouncerLogInfo) GetSnid() int32 { @@ -7965,11 +8036,11 @@ func (x *AnnouncerLogInfo) GetName() string { return "" } -func (x *AnnouncerLogInfo) GetPhone() int32 { +func (x *AnnouncerLogInfo) GetPhone() string { if x != nil { return x.Phone } - return 0 + return "" } func (x *AnnouncerLogInfo) GetItemId() int32 { @@ -9217,33 +9288,41 @@ var file_common_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x26, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x74, 0x65, - 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x0e, 0x41, 0x77, 0x61, - 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x08, 0x41, - 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x3c, 0x0a, - 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x6e, 0x6e, - 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x41, - 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x22, 0x62, 0x0a, 0x0c, 0x41, - 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x54, - 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, - 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, - 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x10, 0x0a, - 0x03, 0x55, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x22, - 0x80, 0x01, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x50, 0x68, 0x6f, - 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, - 0x70, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, - 0x49, 0x64, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x0e, 0x41, 0x77, 0x61, + 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x30, 0x0a, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x4c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x65, 0x62, 0x61, + 0x70, 0x69, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x3c, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, + 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, + 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, + 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x22, 0x58, 0x0a, 0x0c, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, + 0x30, 0x0a, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, + 0x67, 0x22, 0x78, 0x0a, 0x0c, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, + 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, + 0x4e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x80, 0x01, 0x0a, 0x10, + 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x53, 0x6e, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x42, 0x26, + 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -9258,7 +9337,7 @@ func file_common_proto_rawDescGZIP() []byte { return file_common_proto_rawDescData } -var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 92) +var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 93) var file_common_proto_goTypes = []interface{}{ (*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting (*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting @@ -9342,32 +9421,33 @@ var file_common_proto_goTypes = []interface{}{ (*SkinItem)(nil), // 79: webapi.SkinItem (*SkinConfig)(nil), // 80: webapi.SkinConfig (*AwardLogConfig)(nil), // 81: webapi.AwardLogConfig - (*AwardLogInfo)(nil), // 82: webapi.AwardLogInfo - (*AnnouncerLogInfo)(nil), // 83: webapi.AnnouncerLogInfo - nil, // 84: webapi.Platform.BindTelRewardEntry - nil, // 85: webapi.PlayerData.RankScoreEntry - nil, // 86: webapi.ItemShop.AwardEntry - nil, // 87: webapi.VIPcfg.AwardEntry - nil, // 88: webapi.VIPcfg.Privilege7Entry - nil, // 89: webapi.ActInviteConfig.PayScoreEntry - nil, // 90: webapi.SkinLevel.UpItemEntry - nil, // 91: webapi.SkinItem.UnlockParamEntry - (*server.DB_GameFree)(nil), // 92: server.DB_GameFree - (*server.DB_GameItem)(nil), // 93: server.DB_GameItem + (*AwardLogData)(nil), // 82: webapi.AwardLogData + (*AwardLogInfo)(nil), // 83: webapi.AwardLogInfo + (*AnnouncerLogInfo)(nil), // 84: webapi.AnnouncerLogInfo + nil, // 85: webapi.Platform.BindTelRewardEntry + nil, // 86: webapi.PlayerData.RankScoreEntry + nil, // 87: webapi.ItemShop.AwardEntry + nil, // 88: webapi.VIPcfg.AwardEntry + nil, // 89: webapi.VIPcfg.Privilege7Entry + nil, // 90: webapi.ActInviteConfig.PayScoreEntry + nil, // 91: webapi.SkinLevel.UpItemEntry + nil, // 92: webapi.SkinItem.UnlockParamEntry + (*server.DB_GameFree)(nil), // 93: server.DB_GameFree + (*server.DB_GameItem)(nil), // 94: server.DB_GameItem } var file_common_proto_depIdxs = []int32{ 2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch 3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig 4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame - 84, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry + 85, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry 6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus - 92, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree + 93, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree 8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree 0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting 1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting 1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting - 92, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree - 85, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry + 93, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree + 86, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry 32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo 14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo 14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo @@ -9379,7 +9459,7 @@ var file_common_proto_depIdxs = []int32{ 26, // 20: webapi.ExchangeShop.TelData:type_name -> webapi.TelChargeData 25, // 21: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop 29, // 22: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight - 86, // 23: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry + 87, // 23: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry 30, // 24: webapi.ItemShopList.List:type_name -> webapi.ItemShop 32, // 25: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo 33, // 26: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward @@ -9400,12 +9480,12 @@ var file_common_proto_depIdxs = []int32{ 38, // 41: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate 48, // 42: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree 48, // 43: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree - 87, // 44: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry - 88, // 45: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry + 88, // 44: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry + 89, // 45: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry 51, // 46: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg 38, // 47: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate 55, // 48: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig - 89, // 49: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry + 90, // 49: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry 62, // 50: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward 62, // 51: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward 62, // 52: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward @@ -9422,21 +9502,22 @@ var file_common_proto_depIdxs = []int32{ 69, // 63: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo 70, // 64: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers 72, // 65: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData - 93, // 66: webapi.ItemConfig.Items:type_name -> server.DB_GameItem + 94, // 66: webapi.ItemConfig.Items:type_name -> server.DB_GameItem 32, // 67: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo 75, // 68: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo 76, // 69: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo - 90, // 70: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry - 91, // 71: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry + 91, // 70: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry + 92, // 71: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry 78, // 72: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel 79, // 73: webapi.SkinConfig.Items:type_name -> webapi.SkinItem - 82, // 74: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogInfo - 83, // 75: webapi.AwardLogConfig.AnnouncerLog:type_name -> webapi.AnnouncerLogInfo - 76, // [76:76] is the sub-list for method output_type - 76, // [76:76] is the sub-list for method input_type - 76, // [76:76] is the sub-list for extension type_name - 76, // [76:76] is the sub-list for extension extendee - 0, // [0:76] is the sub-list for field type_name + 82, // 74: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData + 84, // 75: webapi.AwardLogConfig.AnnouncerLog:type_name -> webapi.AnnouncerLogInfo + 83, // 76: webapi.AwardLogData.AwardLog:type_name -> webapi.AwardLogInfo + 77, // [77:77] is the sub-list for method output_type + 77, // [77:77] is the sub-list for method input_type + 77, // [77:77] is the sub-list for extension type_name + 77, // [77:77] is the sub-list for extension extendee + 0, // [0:77] is the sub-list for field type_name } func init() { file_common_proto_init() } @@ -10430,7 +10511,7 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AwardLogInfo); i { + switch v := v.(*AwardLogData); i { case 0: return &v.state case 1: @@ -10442,6 +10523,18 @@ func file_common_proto_init() { } } file_common_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AwardLogInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnnouncerLogInfo); i { case 0: return &v.state @@ -10460,7 +10553,7 @@ func file_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_proto_rawDesc, NumEnums: 0, - NumMessages: 92, + NumMessages: 93, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/webapi/common.proto b/protocol/webapi/common.proto index b076bae..d861aa7 100644 --- a/protocol/webapi/common.proto +++ b/protocol/webapi/common.proto @@ -862,7 +862,7 @@ message AwardLogConfig{ } message AwardLogData{ - int32 TypeId = 1; //排序類型 + int32 TypeId = 1; //排序類型 1-数量 2-序号 repeated AwardLogInfo AwardLog =2; } message AwardLogInfo{ @@ -870,14 +870,14 @@ message AwardLogInfo{ int32 ItemId = 2; //道具ID int64 Num = 4; //数量 string Url = 5; //话费icon - int32 AwardTypeId = 4; //排序類型 + int32 Order = 6; //序号 } //实时播报 message AnnouncerLogInfo{ int32 Snid = 1; //玩家ID string Name = 2; //玩家名字 - int32 Phone = 3; //电话 + string Phone = 3; //电话 int32 ItemId = 4; //获得物品ID int32 TypeId = 5; //1-话费 2-实物 } diff --git a/worldsrv/action_player.go b/worldsrv/action_player.go index db2ad3e..6167359 100644 --- a/worldsrv/action_player.go +++ b/worldsrv/action_player.go @@ -2900,54 +2900,43 @@ func CSAwardLog(s *netlib.Session, packetId int, data interface{}, sid int64) er if !ok { return nil } - /* var res []byte - var err error - task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { - param := &webapi_proto.ASAwardLog{ - SnId: p.SnId, - Platform: p.Platform, - } - res, err = webapi.ApiAwardLog(common.GetAppId(), param) - return nil - }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) { - if err != nil || res == nil { - logger.Logger.Errorf("ApiAwardLog err %v", err) - return - } - var info webapi_proto.SAAwardLog - proto.Unmarshal(res, &info) - if info.Tag == webapi_proto.TagCode_SUCCESS { - ret := &player_proto.SCAwardLog{} - for _, value := range info.AwardLog { - infoData := &player_proto.AwardLogInfo{} - infoData.TypeId = value.TypeId - infoData.ItemId = value.ItemId - infoData.Num = value.Num - ret.AwardLog = append(ret.AwardLog, infoData) - } - for _, logInfo := range info.AnnouncerLog { - infoData := &player_proto.AnnouncerLogInfo{} - infoData.Snid = logInfo.Snid - infoData.Name = logInfo.Name - infoData.Phone = logInfo.Phone - infoData.ItemId = logInfo.ItemId - infoData.TypeId = logInfo.TypeId - ret.AnnouncerLog = append(ret.AnnouncerLog, infoData) - } - p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCAwardLog), ret) - } else { - logger.Logger.Errorf("API_AwardLog err %v", info.Msg) - } - }), "API_AwardLog").Start()*/ + awardLogConfig := PlatformMgrSingleton.GetConfig("1").AwardLogConfig + AwardLog := AwardLogMgr.GetAwardLog(msg.TypeId) ret := &player_proto.SCAwardLog{} + awardData := &player_proto.AwardLogData{} ret.TypeId = msg.TypeId for itemId, num := range AwardLog { + itemNum := int64(num) infoData := &player_proto.AwardLogInfo{} infoData.ItemId = itemId - infoData.Num = int64(num) - ret.AwardLog = append(ret.AwardLog, infoData) + infoData.Num = itemNum + awardData.AwardLog = append(awardData.AwardLog, infoData) } + //处理后台数据 + for _, awardLog := range awardLogConfig.AwardLog.AwardLog { + if awardLog.TypeId == msg.TypeId { + status := false + for _, info := range awardData.AwardLog { + if awardLog.ItemId == info.ItemId { + status = true + if awardLog.Num > info.Num { + info.Num = awardLog.Num + } + break + } + } + if !status { + infoData := &player_proto.AwardLogInfo{} + infoData.ItemId = awardLog.ItemId + infoData.Num = awardLog.Num + awardData.AwardLog = append(awardData.AwardLog, infoData) + } + } + } + awardData.TypeId = awardLogConfig.AwardLog.TypeId + ret.AwardLog = awardData + //实时播报数据 AnnouncerLog := AwardLogMgr.GetAnnouncerLog(msg.TypeId) for _, logInfo := range AnnouncerLog { infoData := &player_proto.AnnouncerLogInfo{} @@ -2958,6 +2947,24 @@ func CSAwardLog(s *netlib.Session, packetId int, data interface{}, sid int64) er infoData.TypeId = logInfo.TypeId ret.AnnouncerLog = append(ret.AnnouncerLog, infoData) } + //处理实时播报数据 + if len(ret.AnnouncerLog) < 100 { + //后台数据 + for _, info := range awardLogConfig.AnnouncerLog { + if info.TypeId == msg.TypeId { + infoData := &player_proto.AnnouncerLogInfo{} + infoData.Snid = info.Snid + infoData.Name = info.Name + infoData.Phone = info.Phone[len(info.Phone)-4:] + infoData.ItemId = info.ItemId + infoData.TypeId = info.TypeId + ret.AnnouncerLog = append(ret.AnnouncerLog, infoData) + if len(ret.AnnouncerLog) >= 100 { + break + } + } + } + } p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCAwardLog), ret) return nil } diff --git a/worldsrv/etcd.go b/worldsrv/etcd.go index b16cfe0..69d72a8 100644 --- a/worldsrv/etcd.go +++ b/worldsrv/etcd.go @@ -86,6 +86,8 @@ func init() { etcd.Register(etcd.ETCDKEY_SKin, webapi.SkinConfig{}, platformConfigEvent) //排行榜奖励配置 etcd.Register(etcd.ETCDKEY_RANK_TYPE, webapi.RankTypeConfig{}, platformConfigEvent) + //获奖记录配置 + etcd.Register(etcd.ETCDKEY_AWARD_CONFIG, webapi.AwardLogConfig{}, platformConfigEvent) } func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) { @@ -317,6 +319,8 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e PlatformMgrSingleton.GetConfig(config.Platform).SkinConfig = config case *webapi.RankTypeConfig: PlatformMgrSingleton.GetConfig(config.Platform).RankTypeConfig = config + case *webapi.AwardLogConfig: + PlatformMgrSingleton.GetConfig(config.Platform).AwardLogConfig = config default: logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey) }