用户信息保持

This commit is contained in:
meixiongfeng 2024-01-12 18:46:27 +08:00
parent da6134cdbf
commit 52bb96c96d
2 changed files with 36 additions and 18 deletions

View File

@ -131,6 +131,13 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
if fresh || new { if fresh || new {
this.module.modelRacePagoda.SetRacePagodaRankList(score, session.GetUserId()) this.module.modelRacePagoda.SetRacePagodaRankList(score, session.GetUserId())
mapData["data"] = list.Data mapData["data"] = list.Data
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
if err == nil {
list.Uinfo = comm.GetUserBaseInfo(user)
}
list.Uinfo = comm.GetUserBaseInfo(user)
mapData["uinfo"] = list.Uinfo
this.module.modelRacePagoda.ModifyCrossPagodaRaceData(session.GetUserId(), mapData) this.module.modelRacePagoda.ModifyCrossPagodaRaceData(session.GetUserId(), mapData)
} }

View File

@ -470,6 +470,7 @@ type DBPagodaRace struct {
Rtime int64 `protobuf:"varint,5,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用 Rtime int64 `protobuf:"varint,5,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用
Battlecount int32 `protobuf:"varint,6,opt,name=battlecount,proto3" json:"battlecount"` // 今日挑战次数 Battlecount int32 `protobuf:"varint,6,opt,name=battlecount,proto3" json:"battlecount"` // 今日挑战次数
Reward map[int32]int32 `protobuf:"bytes,7,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 组 Reward map[int32]int32 `protobuf:"bytes,7,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 组
Uinfo *BaseUserInfo `protobuf:"bytes,8,opt,name=uinfo,proto3" json:"uinfo"` //用户基础
} }
func (x *DBPagodaRace) Reset() { func (x *DBPagodaRace) Reset() {
@ -553,6 +554,13 @@ func (x *DBPagodaRace) GetReward() map[int32]int32 {
return nil return nil
} }
func (x *DBPagodaRace) GetUinfo() *BaseUserInfo {
if x != nil {
return x.Uinfo
}
return nil
}
var File_pagoda_pagoda_db_proto protoreflect.FileDescriptor var File_pagoda_pagoda_db_proto protoreflect.FileDescriptor
var file_pagoda_pagoda_db_proto_rawDesc = []byte{ var file_pagoda_pagoda_db_proto_rawDesc = []byte{
@ -626,7 +634,7 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{
0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74,
0x61, 0x72, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x61, 0x72, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e,
0x65, 0x22, 0xe3, 0x02, 0x0a, 0x0c, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x65, 0x22, 0x88, 0x03, 0x0a, 0x0c, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61,
0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03,
@ -640,16 +648,18 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18,
0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61,
0x52, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x42, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x1a, 0x42, 0x0a,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05,
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -692,13 +702,14 @@ var file_pagoda_pagoda_db_proto_depIdxs = []int32{
13, // 7: RaceData.line:type_name -> LineData 13, // 7: RaceData.line:type_name -> LineData
9, // 8: DBPagodaRace.data:type_name -> DBPagodaRace.DataEntry 9, // 8: DBPagodaRace.data:type_name -> DBPagodaRace.DataEntry
10, // 9: DBPagodaRace.reward:type_name -> DBPagodaRace.RewardEntry 10, // 9: DBPagodaRace.reward:type_name -> DBPagodaRace.RewardEntry
4, // 10: DBRacePagodaRecord.DataEntry.value:type_name -> RaceData 12, // 10: DBPagodaRace.uinfo:type_name -> BaseUserInfo
4, // 11: DBPagodaRace.DataEntry.value:type_name -> RaceData 4, // 11: DBRacePagodaRecord.DataEntry.value:type_name -> RaceData
12, // [12:12] is the sub-list for method output_type 4, // 12: DBPagodaRace.DataEntry.value:type_name -> RaceData
12, // [12:12] is the sub-list for method input_type 13, // [13:13] is the sub-list for method output_type
12, // [12:12] is the sub-list for extension type_name 13, // [13:13] is the sub-list for method input_type
12, // [12:12] is the sub-list for extension extendee 13, // [13:13] is the sub-list for extension type_name
0, // [0:12] is the sub-list for field type_name 13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
} }
func init() { file_pagoda_pagoda_db_proto_init() } func init() { file_pagoda_pagoda_db_proto_init() }