diff --git a/comm/const.go b/comm/const.go index b830a04ce..9c9ab3833 100644 --- a/comm/const.go +++ b/comm/const.go @@ -367,8 +367,10 @@ const ( //Rpc Rpc_ModuleBuriedTrigger core.Rpc_Key = "Rpc_ModuleBuriedTrigger" //埋点跨服触发通知 Rpc_OpendCond core.Rpc_Key = "Rpc_OpendCond" - - Rpc_ModuleWarorderSettlement core.Rpc_Key = "Rpc_ModuleWarorderSettlement" //战令结算 + //战令结算事件 + Rpc_ModuleWarorderSettlement core.Rpc_Key = "Rpc_ModuleWarorderSettlement" + //工会boos战结算 事件 + Rpc_ModuleGuildBossSettlement core.Rpc_Key = "Rpc_ModuleGuildBossSettlement" ) // 事件类型定义处 diff --git a/comm/imodule.go b/comm/imodule.go index ededbe826..77864e11f 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -359,6 +359,9 @@ type ( // 公会 ISociaty interface { GetSociaty(uid string) *pb.DBSociaty + //查询工会信息 + GetSociatys(sociatyIds []string) (result []*pb.DBSociaty, errdata *pb.ErrorData) + // 会长弹劾处理 ProcessAccuse(uid, sociatyId string) // 获取我的公会成员 diff --git a/modules/sociaty/api_cross_rank.go b/modules/sociaty/api_cross_rank.go deleted file mode 100644 index 807207381..000000000 --- a/modules/sociaty/api_cross_rank.go +++ /dev/null @@ -1,23 +0,0 @@ -package sociaty - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" -) - -// 公会排行榜 - -func (this *apiComp) RankCheck(session comm.IUserSession, req *pb.SociatyRankReq) (errdata *pb.ErrorData) { - return -} - -func (this *apiComp) Rank(session comm.IUserSession, req *pb.SociatyRankReq) (errdata *pb.ErrorData) { - // 排行榜 - list := this.module.modelSociaty.rank() - rsp := &pb.SociatyRankResp{ - Rank: list, - } - - session.SendMsg(string(this.module.GetType()), SociatySubTypeRank, rsp) - return -} diff --git a/modules/sociaty/model_sociaty.go b/modules/sociaty/model_sociaty.go index b39d070c0..c5bbe55a0 100644 --- a/modules/sociaty/model_sociaty.go +++ b/modules/sociaty/model_sociaty.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/lego/core" event_v2 "go_dreamfactory/lego/sys/event/v2" "go_dreamfactory/lego/sys/log" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" @@ -178,6 +179,17 @@ func (this *ModelSociaty) getSociaty(sociatyId string) (sociaty *pb.DBSociaty) { return } +// 查询用户装备数据 +func (this *ModelSociaty) querySociatys(sociatyIds []string) (result []*pb.DBSociaty, err error) { + result = make([]*pb.DBSociaty, 0) + if _, err = this.Gets(sociatyIds, &result); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + return + } + err = nil + return +} + // 公会是否解散 func (this *ModelSociaty) isDismiss(sociaty *pb.DBSociaty) bool { if sociaty.DismissTime == 0 { @@ -487,7 +499,7 @@ func (this *ModelSociaty) agree(uid string, sociaty *pb.DBSociaty) error { if this.isMember(uid, sociaty) { return comm.NewCustomError(pb.ErrorCode_SociatyBelongTo) } - + // 判断改用户是否在申请记录中 var flag bool for _, r := range sociaty.GetApplyRecord() { diff --git a/modules/sociaty/module.go b/modules/sociaty/module.go index 96804b12d..0b3259146 100644 --- a/modules/sociaty/module.go +++ b/modules/sociaty/module.go @@ -147,6 +147,21 @@ func (this *Sociaty) MembersBySociatyId(sociatyId string) (list []*pb.SociatyMem return this.modelSociaty.members(sociaty) } +// 批量获取公户信息 +func (this *Sociaty) GetSociatys(sociatyIds []string) (result []*pb.DBSociaty, errdata *pb.ErrorData) { + var ( + err error + ) + if result, err = this.modelSociaty.querySociatys(sociatyIds); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.String(), + Message: err.Error(), + } + } + return +} + // 公会 func (this *Sociaty) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { reddot = make(map[comm.ReddotType]*pb.ReddotItem) diff --git a/modules/uniongve/api_challengefinish.go b/modules/uniongve/api_challengefinish.go index bcd6e8225..7a3a1e0f5 100644 --- a/modules/uniongve/api_challengefinish.go +++ b/modules/uniongve/api_challengefinish.go @@ -5,6 +5,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/log" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" ) @@ -85,6 +86,9 @@ func (this *apiComp) ChallengeFinish(session comm.IUserSession, req *pb.Uniongve go this.module.modelUniongve.booshpchangepush(req.Unionid, info) if v.Hp < 0 { v.Hp = 0 + info.Kills++ + info.Lastkilltime = configure.Now().Unix() + this.module.modelRank.updateRank(info) go this.module.modelUniongve.booskill(req.Unionid, req.Boosid, info) } } diff --git a/modules/uniongve/api_rank.go b/modules/uniongve/api_rank.go index efb52c819..859eec159 100644 --- a/modules/uniongve/api_rank.go +++ b/modules/uniongve/api_rank.go @@ -13,11 +13,35 @@ func (this *apiComp) RankCheck(session comm.IUserSession, req *pb.UniongveRankRe // 获取工会boos战信息 func (this *apiComp) Rank(session comm.IUserSession, req *pb.UniongveRankReq) (errdata *pb.ErrorData) { - + var ( + err error + ids []string + sociatys []*pb.DBSociaty + ranks []*pb.UniongveRankItem + ) if errdata = this.RankCheck(session, req); errdata != nil { return } + if ids, err = this.module.modelRank.queryRankUser(); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } - session.SendMsg(string(this.module.GetType()), "rank", &pb.UniongveRankResp{}) + if sociatys, errdata = this.module.sociaty.GetSociatys(ids); errdata != nil { + return + } + + for i, v := range sociatys { + ranks = append(ranks, &pb.UniongveRankItem{ + Unionid: v.Id, + Name: v.Name, + Rank: int32(i), + }) + } + session.SendMsg(string(this.module.GetType()), "rank", &pb.UniongveRankResp{List: ranks}) return } diff --git a/modules/uniongve/comp_configure.go b/modules/uniongve/comp_configure.go index 3aca237f2..1c44186cc 100644 --- a/modules/uniongve/comp_configure.go +++ b/modules/uniongve/comp_configure.go @@ -144,3 +144,21 @@ func (this *MCompConfigure) getguildbossscore(group int32, harm int32) (results } return } + +func (this *MCompConfigure) getRankReward() (results *cfg.GameGuildBossRank, err error) { + var ( + v interface{} + ok bool + ) + + if v, err = this.GetConfigure(game_guildbossrank); err != nil { + return + } else { + if results, ok = v.(*cfg.GameGuildBossRank); !ok { + err = fmt.Errorf("%T no is *cfg.GameGuildBossRank", v) + this.module.Errorf("err:%v", err) + return + } + } + return +} diff --git a/modules/uniongve/modelUniongve.go b/modules/uniongve/modelUniongve.go index 3aa9a29e0..f7f8eecb5 100644 --- a/modules/uniongve/modelUniongve.go +++ b/modules/uniongve/modelUniongve.go @@ -79,11 +79,14 @@ func (this *ModelUniongve) getUnionGve(unionid string) (results *pb.DBUnionGve, func (this *ModelUniongve) updateUnionGve(data *pb.DBUnionGve) (err error) { if err = this.Change(data.Unionid, map[string]interface{}{ - "fire": data.Fire, - "notice": data.Notice, - "currstage": data.Currstage, - "rtime": data.Rtime, - "boos": data.Boos, + "fire": data.Fire, + "notice": data.Notice, + "currstage": data.Currstage, + "rtime": data.Rtime, + "kills": data.Kills, + "lastkilltime": data.Lastkilltime, + "rank": data.Rank, + "boos": data.Boos, }); err != nil { this.module.Error("更新用户任务数据 错误!", log.Field{Key: "err", Value: err.Error()}) return @@ -186,8 +189,6 @@ func (this *ModelUniongve) booskill(unionid string, boosid int32, info *pb.DBUni conf *cfg.GameGuildBossData members []*pb.SociatyMemberInfo users []string = make([]string, 0) - offlist []string = make([]string, 0) - onine []string = make([]string, 0) err error ) if conf, err = this.module.configure.getguildbossByid(boosid); err != nil { @@ -201,15 +202,10 @@ func (this *ModelUniongve) booskill(unionid string, boosid int32, info *pb.DBUni } for _, v := range members { users = append(users, v.Uid) - if v.OfflineTime != 0 { - offlist = append(offlist, v.Uid) - } else { - onine = append(onine, v.Uid) - } + } - this.module.mail.SendMailToUsers(offlist, "Guild_Boss", conf.KillReward, nil) - this.module.mail.SendMailToUsers(onine, "Guild_Boss", conf.KillReward, nil) + this.module.mail.SendMailToUsers(users, "Guild_Boss", conf.KillReward, nil) for _, v := range info.Boos { if v.Hp > 0 { diff --git a/modules/uniongve/modelrank.go b/modules/uniongve/modelrank.go new file mode 100644 index 000000000..45cb54206 --- /dev/null +++ b/modules/uniongve/modelrank.go @@ -0,0 +1,134 @@ +package uniongve + +import ( + "context" + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/lego/sys/redis/pipe" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "go_dreamfactory/utils" + "sync" + "time" + + "github.com/go-redis/redis/v8" +) + +type modelRank struct { + modules.MCompModel + module *UnionGve + conflock sync.RWMutex + bossconf *pb.DBUnionGveBossConf +} + +func (this *modelRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.TableName = comm.TableUnionroulette + this.module = module.(*UnionGve) + return +} + +func (this *modelRank) Start() (err error) { + err = this.MCompModel.Start() + return +} + +// 获取排行榜前50的用户名单 +func (this *modelRank) queryRankUser() (ranks []string, err error) { + var ( + result []string + ) + if result, err = this.DBModel.Redis.ZRevRange(this.TableName, 0, 50).Result(); err != nil { + this.module.Errorln(err) + return + } + ranks = make([]string, 0) + for i := 0; i < len(result); i += 1 { + ranks = append(ranks, result[i]) + } + return +} + +// 更新排名 +func (this *modelRank) updateRank(guilds ...*pb.DBUnionGve) (err error) { + var ( + pipe *pipe.RedisPipe = this.DBModel.Redis.RedisPipe(context.TODO()) + menbers []*redis.Z + cmd *redis.IntCmd + menbersCmd []*redis.IntCmd = make([]*redis.IntCmd, len(guilds)) + rank int64 + ) + menbers = make([]*redis.Z, len(guilds)) + for i, v := range guilds { + endtime := time.Unix(utils.WeekIntervalTime(0), 0) + start := time.Unix(v.Lastkilltime, 0) + seconds := endtime.Sub(start).Seconds() + Integral := float64(v.Kills)*float64(10000000000) + seconds + menbers[i] = &redis.Z{Score: Integral, Member: v.Unionid} + } + if cmd = pipe.ZAdd(this.TableName, menbers...); err != nil { + this.module.Errorln(err) + } + for i, v := range guilds { + menbersCmd[i] = pipe.ZRevRank(this.TableName, v.Unionid) + } + if _, err = pipe.Exec(); err != nil { + this.module.Errorln(err) + return + } + if _, err = cmd.Result(); err != nil { + this.module.Errorln(err) + return + } + for i, v := range menbersCmd { + if rank, err = v.Result(); err != nil { + this.module.Errorln(err) + return + } + guilds[i].Rank = int32(rank + 1) + } + return +} + +// 比赛结算 +func (this *modelRank) raceSettlement() { + var ( + reward *cfg.GameGuildBossRank + result []string + err error + ) + if reward, err = this.module.configure.getRankReward(); err != nil { + this.module.Errorln(err) + return + } + for _, v := range reward.GetDataList() { + if result, err = this.DBModel.Redis.ZRevRange(this.TableName, int64(v.RankLow-1), int64(v.RankUp)).Result(); err != nil { + this.module.Errorln(err) + return + } + this.module.Debug("推送 排行榜奖励 ", log.Field{Key: "rank", Value: v.Id}, log.Field{Key: "ids", Value: result}) + for i := 0; i < len(result); i += 2 { + this.rankRewardPush(result[i], v.Reward) + } + } + +} + +// boos 血量变化推送 +func (this *modelRank) rankRewardPush(unionid string, reward []*cfg.Gameatn) { + var ( + members []*pb.SociatyMemberInfo + users []string = make([]string, 0) + ) + members = this.module.sociaty.MembersBySociatyId(unionid) + if members == nil || len(members) == 0 { + this.module.Error("MembersBySociatyId is nil !") + return + } + for _, v := range members { + users = append(users, v.Uid) + } + this.module.mail.SendMailToUsers(users, "Guild_Boss", reward, nil) +} diff --git a/modules/uniongve/module.go b/modules/uniongve/module.go index b89e6caf4..e4d57b141 100644 --- a/modules/uniongve/module.go +++ b/modules/uniongve/module.go @@ -1,9 +1,11 @@ package uniongve import ( + "context" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" + "go_dreamfactory/pb" ) func NewModule() core.IModule { @@ -13,13 +15,14 @@ func NewModule() core.IModule { type UnionGve struct { modules.ModuleBase - service core.IService + service comm.IService sociaty comm.ISociaty mail comm.Imail battle comm.IBattle api *apiComp modelUniongve *ModelUniongve modelUnionroulette *ModelUnionroulette + modelRank *modelRank configure *MCompConfigure } @@ -31,7 +34,7 @@ func (this *UnionGve) GetType() core.M_Modules { // 模块初始化接口 注册用户创建角色事件 func (this *UnionGve) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) - this.service = service + this.service = service.(comm.IService) return } func (this *UnionGve) Start() (err error) { @@ -49,6 +52,7 @@ func (this *UnionGve) Start() (err error) { return } this.battle = module.(comm.IBattle) + this.service.RegisterFunctionName(string(comm.Rpc_ModuleGuildBossSettlement), this.Rpc_ModuleGuildBossSettlement) return } @@ -59,4 +63,12 @@ func (this *UnionGve) OnInstallComp() { this.configure = this.RegisterComp(new(MCompConfigure)).(*MCompConfigure) this.modelUniongve = this.RegisterComp(new(ModelUniongve)).(*ModelUniongve) this.modelUnionroulette = this.RegisterComp(new(ModelUnionroulette)).(*ModelUnionroulette) + this.modelRank = this.RegisterComp(new(modelRank)).(*modelRank) +} + +// 工会Boos战结算通知 +func (this *UnionGve) Rpc_ModuleGuildBossSettlement(ctx context.Context, req *pb.EmptyReq, resp interface{}) (err error) { + this.Debug("Rpc_ModuleGuildBossSettlement 工会Boos战结算通知 !") + this.modelRank.raceSettlement() + return } diff --git a/pb/uniongve_db.pb.go b/pb/uniongve_db.pb.go index c9ba046d0..a6a3c587c 100644 --- a/pb/uniongve_db.pb.go +++ b/pb/uniongve_db.pb.go @@ -90,12 +90,15 @@ type DBUnionGve struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Unionid string `protobuf:"bytes,1,opt,name=unionid,proto3" json:"unionid"` //工会id - Notice string `protobuf:"bytes,2,opt,name=notice,proto3" json:"notice"` //公告 - Fire int32 `protobuf:"varint,3,opt,name=fire,proto3" json:"fire"` //火力 - Currstage int32 `protobuf:"varint,4,opt,name=currstage,proto3" json:"currstage"` //当前第几阶段 - Rtime int64 `protobuf:"varint,5,opt,name=rtime,proto3" json:"rtime"` //刷新时间 - Boos []*DBUnionGveBoss `protobuf:"bytes,6,rep,name=boos,proto3" json:"boos"` //boos列表 + Unionid string `protobuf:"bytes,1,opt,name=unionid,proto3" json:"unionid"` //工会id + Notice string `protobuf:"bytes,2,opt,name=notice,proto3" json:"notice"` //公告 + Fire int32 `protobuf:"varint,3,opt,name=fire,proto3" json:"fire"` //火力 + Currstage int32 `protobuf:"varint,4,opt,name=currstage,proto3" json:"currstage"` //当前第几阶段 + Rtime int64 `protobuf:"varint,5,opt,name=rtime,proto3" json:"rtime"` //刷新时间 + Kills int32 `protobuf:"varint,6,opt,name=kills,proto3" json:"kills"` //击杀数 + Lastkilltime int64 `protobuf:"varint,7,opt,name=lastkilltime,proto3" json:"lastkilltime"` //最后击杀时间 + Rank int32 `protobuf:"varint,8,opt,name=rank,proto3" json:"rank"` //排名 + Boos []*DBUnionGveBoss `protobuf:"bytes,9,rep,name=boos,proto3" json:"boos"` //boos列表 } func (x *DBUnionGve) Reset() { @@ -165,6 +168,27 @@ func (x *DBUnionGve) GetRtime() int64 { return 0 } +func (x *DBUnionGve) GetKills() int32 { + if x != nil { + return x.Kills + } + return 0 +} + +func (x *DBUnionGve) GetLastkilltime() int64 { + if x != nil { + return x.Lastkilltime + } + return 0 +} + +func (x *DBUnionGve) GetRank() int32 { + if x != nil { + return x.Rank + } + return 0 +} + func (x *DBUnionGve) GetBoos() []*DBUnionGveBoss { if x != nil { return x.Boos @@ -298,8 +322,10 @@ type DBGveRecord struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` - Formation []string `protobuf:"bytes,2,rep,name=formation,proto3" json:"formation"` + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //uid + Formation []string `protobuf:"bytes,2,rep,name=formation,proto3" json:"formation"` //阵型 + Rating int32 `protobuf:"varint,3,opt,name=rating,proto3" json:"rating"` //评级 + Harm int32 `protobuf:"varint,4,opt,name=harm,proto3" json:"harm"` //伤害血量 } func (x *DBGveRecord) Reset() { @@ -348,6 +374,20 @@ func (x *DBGveRecord) GetFormation() []string { return nil } +func (x *DBGveRecord) GetRating() int32 { + if x != nil { + return x.Rating + } + return 0 +} + +func (x *DBGveRecord) GetHarm() int32 { + if x != nil { + return x.Harm + } + return 0 +} + type DBGveRouletteRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -413,7 +453,7 @@ var file_uniongve_uniongve_db_proto_rawDesc = []byte{ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0a, 0x44, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, @@ -422,31 +462,39 @@ var file_uniongve_uniongve_db_proto_rawDesc = []byte{ 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x72, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x72, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, - 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, - 0x73, 0x73, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x22, 0x63, 0x0a, 0x15, 0x44, 0x42, 0x55, 0x6e, - 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x72, - 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x22, 0x5e, 0x0a, - 0x0e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x70, 0x12, 0x24, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x3d, 0x0a, - 0x0b, 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x13, - 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, + 0x74, 0x6b, 0x69, 0x6c, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x6b, 0x69, 0x6c, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, + 0x6b, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, + 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x22, 0x63, 0x0a, 0x15, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, + 0x6e, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x6f, 0x75, + 0x6c, 0x65, 0x74, 0x74, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, + 0x47, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x44, + 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, + 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x68, 0x70, 0x12, 0x24, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x69, 0x0a, 0x0b, 0x44, + 0x42, 0x47, 0x76, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x68, 0x61, 0x72, 0x6d, 0x22, 0x4a, 0x0a, 0x13, 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, + 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, + 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/uniongve_msg.pb.go b/pb/uniongve_msg.pb.go index 2b725d5ae..cabc7a445 100644 --- a/pb/uniongve_msg.pb.go +++ b/pb/uniongve_msg.pb.go @@ -336,7 +336,7 @@ type UniongveRankResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - List []*UniongveRankReq `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` + List []*UniongveRankItem `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` } func (x *UniongveRankResp) Reset() { @@ -371,7 +371,7 @@ func (*UniongveRankResp) Descriptor() ([]byte, []int) { return file_uniongve_uniongve_msg_proto_rawDescGZIP(), []int{6} } -func (x *UniongveRankResp) GetList() []*UniongveRankReq { +func (x *UniongveRankResp) GetList() []*UniongveRankItem { if x != nil { return x.List } @@ -968,66 +968,66 @@ var file_uniongve_uniongve_msg_proto_rawDesc = []byte{ 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x38, 0x0a, 0x10, 0x55, 0x6e, - 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, - 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x55, - 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x52, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, - 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x39, 0x0a, 0x10, 0x55, 0x6e, + 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, + 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x55, + 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, + 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, + 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, + 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, + 0x76, 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x69, 0x64, + 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, + 0x61, 0x72, 0x64, 0x22, 0x72, 0x0a, 0x14, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, - 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, - 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, - 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, - 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, - 0x72, 0x64, 0x22, 0x72, 0x0a, 0x14, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, - 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, - 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x06, - 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, - 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x6a, 0x0a, 0x15, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, - 0x76, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, - 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, - 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x22, 0x75, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x70, + 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x28, 0x0a, + 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x6a, 0x0a, 0x15, 0x55, 0x6e, 0x69, 0x6f, 0x6e, + 0x67, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, - 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x1b, 0x55, 0x6e, - 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x46, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, - 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, - 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x61, - 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x39, 0x0a, 0x16, - 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, - 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3a, 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x6f, 0x6e, - 0x67, 0x76, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, - 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, 0x69, - 0x6e, 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x16, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x42, - 0x6f, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, - 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x4c, - 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, - 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x2e, 0x0a, 0x06, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, - 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, + 0x6e, 0x66, 0x6f, 0x22, 0x75, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, + 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, + 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, + 0x73, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x1b, 0x55, + 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, + 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, + 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, + 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, + 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x39, 0x0a, + 0x16, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, + 0x76, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3a, 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x6f, + 0x6e, 0x67, 0x76, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, + 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x16, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, + 0x42, 0x6f, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, + 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, + 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, + 0x4c, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, + 0x74, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x2e, 0x0a, + 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1070,7 +1070,7 @@ var file_uniongve_uniongve_msg_proto_goTypes = []interface{}{ } var file_uniongve_uniongve_msg_proto_depIdxs = []int32{ 17, // 0: UniongveInfoResp.info:type_name -> DBUnionGve - 4, // 1: UniongveRankResp.list:type_name -> UniongveRankReq + 5, // 1: UniongveRankResp.list:type_name -> UniongveRankItem 18, // 2: UniongveRouletteResp.award:type_name -> UserAssets 19, // 3: UniongveChallengeReq.battle:type_name -> BattleFormation 20, // 4: UniongveChallengeResp.info:type_name -> BattleInfo diff --git a/utils/utils_test.go b/utils/utils_test.go index daafaac4f..0579bd86a 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -99,3 +99,11 @@ func BenchmarkRandNumbers(b *testing.B) { utils.RandomNumbers(0, 7, 4) } } + +func TestWeekIntervalTime(t *testing.T) { + ti := utils.WeekIntervalTime(0) + format := "2006-01-02 15:04:05" + formattedTime := time.Unix(ti, 0).Format(format) + fmt.Println(formattedTime) + +}