diff --git a/app/user_center/etc/user_center.yaml b/app/user_center/etc/user_center.yaml deleted file mode 100644 index 6be3c1b..0000000 --- a/app/user_center/etc/user_center.yaml +++ /dev/null @@ -1,6 +0,0 @@ -Name: usercenter.rpc -ListenOn: 127.0.0.1:8080 -Etcd: - Hosts: - - 127.0.0.1:2379 - Key: usercenter.rpc diff --git a/app/user_center/internal/config/config.go b/app/user_center/internal/config/config.go deleted file mode 100644 index c1f85b9..0000000 --- a/app/user_center/internal/config/config.go +++ /dev/null @@ -1,7 +0,0 @@ -package config - -import "github.com/zeromicro/go-zero/zrpc" - -type Config struct { - zrpc.RpcServerConf -} diff --git a/app/user_center/internal/logic/buy_elite_logic.go b/app/user_center/internal/logic/buy_elite_logic.go deleted file mode 100644 index dcab7c7..0000000 --- a/app/user_center/internal/logic/buy_elite_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type BuyEliteLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewBuyEliteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BuyEliteLogic { - return &BuyEliteLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *BuyEliteLogic) BuyElite(in *pb.EliteReq) (*pb.BuyEliteResp, error) { - // todo: add your logic here and delete this line - - return &pb.BuyEliteResp{}, nil -} diff --git a/app/user_center/internal/logic/buy_title_logic.go b/app/user_center/internal/logic/buy_title_logic.go deleted file mode 100644 index 13a33ce..0000000 --- a/app/user_center/internal/logic/buy_title_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type BuyTitleLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewBuyTitleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BuyTitleLogic { - return &BuyTitleLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *BuyTitleLogic) BuyTitle(in *pb.TitleReq) (*pb.BuyTitleResp, error) { - // todo: add your logic here and delete this line - - return &pb.BuyTitleResp{}, nil -} diff --git a/app/user_center/internal/logic/change_coin_logic.go b/app/user_center/internal/logic/change_coin_logic.go deleted file mode 100644 index 0d0b725..0000000 --- a/app/user_center/internal/logic/change_coin_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type ChangeCoinLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewChangeCoinLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChangeCoinLogic { - return &ChangeCoinLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// changeCoin 新增或扣减用户弹币 -func (l *ChangeCoinLogic) ChangeCoin(in *pb.ChangeCoinReq) (*pb.Empty, error) { - // todo: add your logic here and delete this line - - return &pb.Empty{}, nil -} diff --git a/app/user_center/internal/logic/change_elite_logic.go b/app/user_center/internal/logic/change_elite_logic.go deleted file mode 100644 index c5998dd..0000000 --- a/app/user_center/internal/logic/change_elite_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type ChangeEliteLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewChangeEliteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChangeEliteLogic { - return &ChangeEliteLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *ChangeEliteLogic) ChangeElite(in *pb.EliteReq) (*pb.ChangeEliteResp, error) { - // todo: add your logic here and delete this line - - return &pb.ChangeEliteResp{}, nil -} diff --git a/app/user_center/internal/logic/change_title_logic.go b/app/user_center/internal/logic/change_title_logic.go deleted file mode 100644 index 13dd667..0000000 --- a/app/user_center/internal/logic/change_title_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type ChangeTitleLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewChangeTitleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChangeTitleLogic { - return &ChangeTitleLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *ChangeTitleLogic) ChangeTitle(in *pb.TitleReq) (*pb.ChangeTitleResp, error) { - // todo: add your logic here and delete this line - - return &pb.ChangeTitleResp{}, nil -} diff --git a/app/user_center/internal/logic/draw_gift_pack_logic.go b/app/user_center/internal/logic/draw_gift_pack_logic.go deleted file mode 100644 index 723d1cc..0000000 --- a/app/user_center/internal/logic/draw_gift_pack_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type DrawGiftPackLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewDrawGiftPackLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DrawGiftPackLogic { - return &DrawGiftPackLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *DrawGiftPackLogic) DrawGiftPack(in *pb.DrawGiftPackReq) (*pb.DrawGiftPackResp, error) { - // todo: add your logic here and delete this line - - return &pb.DrawGiftPackResp{}, nil -} diff --git a/app/user_center/internal/logic/get_user_coin_logic.go b/app/user_center/internal/logic/get_user_coin_logic.go deleted file mode 100644 index 7f1d936..0000000 --- a/app/user_center/internal/logic/get_user_coin_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type GetUserCoinLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewGetUserCoinLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserCoinLogic { - return &GetUserCoinLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// getUserCoin 获取用户弹币 -func (l *GetUserCoinLogic) GetUserCoin(in *pb.UserIdReq) (*pb.GetUserCoinResp, error) { - // todo: add your logic here and delete this line - - return &pb.GetUserCoinResp{}, nil -} diff --git a/app/user_center/internal/logic/get_user_details_logic.go b/app/user_center/internal/logic/get_user_details_logic.go deleted file mode 100644 index 9dbdca3..0000000 --- a/app/user_center/internal/logic/get_user_details_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type GetUserDetailsLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewGetUserDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserDetailsLogic { - return &GetUserDetailsLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// getUserDetails 获取用户详细信息 -func (l *GetUserDetailsLogic) GetUserDetails(in *pb.UserIdReq) (*pb.UserDetailsResp, error) { - // todo: add your logic here and delete this line - - return &pb.UserDetailsResp{}, nil -} diff --git a/app/user_center/internal/logic/get_user_id_by_p_uid_logic.go b/app/user_center/internal/logic/get_user_id_by_p_uid_logic.go deleted file mode 100644 index bd87085..0000000 --- a/app/user_center/internal/logic/get_user_id_by_p_uid_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type GetUserIdByPUidLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewGetUserIdByPUidLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserIdByPUidLogic { - return &GetUserIdByPUidLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// getUserIdByPUid 通过平台用户id获取系统用户ID -func (l *GetUserIdByPUidLogic) GetUserIdByPUid(in *pb.PlatformUserReq) (*pb.UserIdResp, error) { - // todo: add your logic here and delete this line - - return &pb.UserIdResp{}, nil -} diff --git a/app/user_center/internal/logic/give_elite_logic.go b/app/user_center/internal/logic/give_elite_logic.go deleted file mode 100644 index 4196536..0000000 --- a/app/user_center/internal/logic/give_elite_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type GiveEliteLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewGiveEliteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GiveEliteLogic { - return &GiveEliteLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *GiveEliteLogic) GiveElite(in *pb.GiveEliteReq) (*pb.BuyEliteResp, error) { - // todo: add your logic here and delete this line - - return &pb.BuyEliteResp{}, nil -} diff --git a/app/user_center/internal/logic/give_title_logic.go b/app/user_center/internal/logic/give_title_logic.go deleted file mode 100644 index d4361d9..0000000 --- a/app/user_center/internal/logic/give_title_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type GiveTitleLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewGiveTitleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GiveTitleLogic { - return &GiveTitleLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *GiveTitleLogic) GiveTitle(in *pb.GiveTitleReq) (*pb.BuyTitleResp, error) { - // todo: add your logic here and delete this line - - return &pb.BuyTitleResp{}, nil -} diff --git a/app/user_center/internal/logic/rank_pvp_logic.go b/app/user_center/internal/logic/rank_pvp_logic.go deleted file mode 100644 index 6a68e3a..0000000 --- a/app/user_center/internal/logic/rank_pvp_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type RankPvpLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewRankPvpLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RankPvpLogic { - return &RankPvpLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// rankPvp pvp排行 -func (l *RankPvpLogic) RankPvp(in *pb.RankPvpReq) (*pb.RankPvpResp, error) { - // todo: add your logic here and delete this line - - return &pb.RankPvpResp{}, nil -} diff --git a/app/user_center/internal/logic/rank_pvp_submit_logic.go b/app/user_center/internal/logic/rank_pvp_submit_logic.go deleted file mode 100644 index 8d4d51e..0000000 --- a/app/user_center/internal/logic/rank_pvp_submit_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type RankPvpSubmitLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewRankPvpSubmitLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RankPvpSubmitLogic { - return &RankPvpSubmitLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *RankPvpSubmitLogic) RankPvpSubmit(in *pb.RankPvpSubmitReq) (*pb.RankPvpSubmitResp, error) { - // todo: add your logic here and delete this line - - return &pb.RankPvpSubmitResp{}, nil -} diff --git a/app/user_center/internal/logic/retrieve_platform_user_logic.go b/app/user_center/internal/logic/retrieve_platform_user_logic.go deleted file mode 100644 index 7e1b43d..0000000 --- a/app/user_center/internal/logic/retrieve_platform_user_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type RetrievePlatformUserLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewRetrievePlatformUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RetrievePlatformUserLogic { - return &RetrievePlatformUserLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// retrievePlatformUser 新增或获取用户 -func (l *RetrievePlatformUserLogic) RetrievePlatformUser(in *pb.PlatformUserReq) (*pb.PlatformUserResp, error) { - // todo: add your logic here and delete this line - - return &pb.PlatformUserResp{}, nil -} diff --git a/app/user_center/internal/logic/stat_pvp_report_logic.go b/app/user_center/internal/logic/stat_pvp_report_logic.go deleted file mode 100644 index 8b5c705..0000000 --- a/app/user_center/internal/logic/stat_pvp_report_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type StatPvpReportLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewStatPvpReportLogic(ctx context.Context, svcCtx *svc.ServiceContext) *StatPvpReportLogic { - return &StatPvpReportLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *StatPvpReportLogic) StatPvpReport(in *pb.StatPvPReportReq) (*pb.StatPvPReportResp, error) { - // todo: add your logic here and delete this line - - return &pb.StatPvPReportResp{}, nil -} diff --git a/app/user_center/internal/logic/transfer_user_coin_logic.go b/app/user_center/internal/logic/transfer_user_coin_logic.go deleted file mode 100644 index 4207190..0000000 --- a/app/user_center/internal/logic/transfer_user_coin_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type TransferUserCoinLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewTransferUserCoinLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TransferUserCoinLogic { - return &TransferUserCoinLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// transferUserCoin 转移用户弹币 -func (l *TransferUserCoinLogic) TransferUserCoin(in *pb.TransferUserCoinReq) (*pb.TransferUserCoinResp, error) { - // todo: add your logic here and delete this line - - return &pb.TransferUserCoinResp{}, nil -} diff --git a/app/user_center/internal/logic/user_buy_nobility_logic.go b/app/user_center/internal/logic/user_buy_nobility_logic.go deleted file mode 100644 index 825775a..0000000 --- a/app/user_center/internal/logic/user_buy_nobility_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type UserBuyNobilityLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewUserBuyNobilityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserBuyNobilityLogic { - return &UserBuyNobilityLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *UserBuyNobilityLogic) UserBuyNobility(in *pb.UserBuyNobilityReq) (*pb.Empty, error) { - // todo: add your logic here and delete this line - - return &pb.Empty{}, nil -} diff --git a/app/user_center/internal/logic/user_check_in_logic.go b/app/user_center/internal/logic/user_check_in_logic.go deleted file mode 100644 index ad62fbb..0000000 --- a/app/user_center/internal/logic/user_check_in_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type UserCheckInLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewUserCheckInLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserCheckInLogic { - return &UserCheckInLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// UserCheckIn 用户签到|打卡 -func (l *UserCheckInLogic) UserCheckIn(in *pb.UserIdReq) (*pb.UserCheckInResp, error) { - // todo: add your logic here and delete this line - - return &pb.UserCheckInResp{}, nil -} diff --git a/app/user_center/internal/logic/user_rank_pvp_logic.go b/app/user_center/internal/logic/user_rank_pvp_logic.go deleted file mode 100644 index 7b8709a..0000000 --- a/app/user_center/internal/logic/user_rank_pvp_logic.go +++ /dev/null @@ -1,30 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type UserRankPvpLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewUserRankPvpLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserRankPvpLogic { - return &UserRankPvpLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *UserRankPvpLogic) UserRankPvp(in *pb.UserRankReq) (*pb.UserRankResp, error) { - // todo: add your logic here and delete this line - - return &pb.UserRankResp{}, nil -} diff --git a/app/user_center/internal/logic/user_send_gift_logic.go b/app/user_center/internal/logic/user_send_gift_logic.go deleted file mode 100644 index 20e873e..0000000 --- a/app/user_center/internal/logic/user_send_gift_logic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/logx" -) - -type UserSendGiftLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewUserSendGiftLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserSendGiftLogic { - return &UserSendGiftLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -// UserSendGift 用户赠送礼物 -func (l *UserSendGiftLogic) UserSendGift(in *pb.UserSendGiftReq) (*pb.Empty, error) { - // todo: add your logic here and delete this line - - return &pb.Empty{}, nil -} diff --git a/app/user_center/internal/server/user_center_server.go b/app/user_center/internal/server/user_center_server.go deleted file mode 100644 index 8202f86..0000000 --- a/app/user_center/internal/server/user_center_server.go +++ /dev/null @@ -1,132 +0,0 @@ -// Code generated by goctl. DO NOT EDIT! -// Source: user_center.proto - -package server - -import ( - "context" - - "dcg/app/user_center/internal/logic" - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" -) - -type UserCenterServer struct { - svcCtx *svc.ServiceContext - pb.UnimplementedUserCenterServer -} - -func NewUserCenterServer(svcCtx *svc.ServiceContext) *UserCenterServer { - return &UserCenterServer{ - svcCtx: svcCtx, - } -} - -// retrievePlatformUser 新增或获取用户 -func (s *UserCenterServer) RetrievePlatformUser(ctx context.Context, in *pb.PlatformUserReq) (*pb.PlatformUserResp, error) { - l := logic.NewRetrievePlatformUserLogic(ctx, s.svcCtx) - return l.RetrievePlatformUser(in) -} - -// getUserDetails 获取用户详细信息 -func (s *UserCenterServer) GetUserDetails(ctx context.Context, in *pb.UserIdReq) (*pb.UserDetailsResp, error) { - l := logic.NewGetUserDetailsLogic(ctx, s.svcCtx) - return l.GetUserDetails(in) -} - -// getUserIdByPUid 通过平台用户id获取系统用户ID -func (s *UserCenterServer) GetUserIdByPUid(ctx context.Context, in *pb.PlatformUserReq) (*pb.UserIdResp, error) { - l := logic.NewGetUserIdByPUidLogic(ctx, s.svcCtx) - return l.GetUserIdByPUid(in) -} - -// UserCheckIn 用户签到|打卡 -func (s *UserCenterServer) UserCheckIn(ctx context.Context, in *pb.UserIdReq) (*pb.UserCheckInResp, error) { - l := logic.NewUserCheckInLogic(ctx, s.svcCtx) - return l.UserCheckIn(in) -} - -// changeCoin 新增或扣减用户弹币 -func (s *UserCenterServer) ChangeCoin(ctx context.Context, in *pb.ChangeCoinReq) (*pb.Empty, error) { - l := logic.NewChangeCoinLogic(ctx, s.svcCtx) - return l.ChangeCoin(in) -} - -// getUserCoin 获取用户弹币 -func (s *UserCenterServer) GetUserCoin(ctx context.Context, in *pb.UserIdReq) (*pb.GetUserCoinResp, error) { - l := logic.NewGetUserCoinLogic(ctx, s.svcCtx) - return l.GetUserCoin(in) -} - -// transferUserCoin 转移用户弹币 -func (s *UserCenterServer) TransferUserCoin(ctx context.Context, in *pb.TransferUserCoinReq) (*pb.TransferUserCoinResp, error) { - l := logic.NewTransferUserCoinLogic(ctx, s.svcCtx) - return l.TransferUserCoin(in) -} - -// UserSendGift 用户赠送礼物 -func (s *UserCenterServer) UserSendGift(ctx context.Context, in *pb.UserSendGiftReq) (*pb.Empty, error) { - l := logic.NewUserSendGiftLogic(ctx, s.svcCtx) - return l.UserSendGift(in) -} - -func (s *UserCenterServer) UserBuyNobility(ctx context.Context, in *pb.UserBuyNobilityReq) (*pb.Empty, error) { - l := logic.NewUserBuyNobilityLogic(ctx, s.svcCtx) - return l.UserBuyNobility(in) -} - -func (s *UserCenterServer) StatPvpReport(ctx context.Context, in *pb.StatPvPReportReq) (*pb.StatPvPReportResp, error) { - l := logic.NewStatPvpReportLogic(ctx, s.svcCtx) - return l.StatPvpReport(in) -} - -func (s *UserCenterServer) DrawGiftPack(ctx context.Context, in *pb.DrawGiftPackReq) (*pb.DrawGiftPackResp, error) { - l := logic.NewDrawGiftPackLogic(ctx, s.svcCtx) - return l.DrawGiftPack(in) -} - -// rankPvp pvp排行 -func (s *UserCenterServer) RankPvp(ctx context.Context, in *pb.RankPvpReq) (*pb.RankPvpResp, error) { - l := logic.NewRankPvpLogic(ctx, s.svcCtx) - return l.RankPvp(in) -} - -func (s *UserCenterServer) RankPvpSubmit(ctx context.Context, in *pb.RankPvpSubmitReq) (*pb.RankPvpSubmitResp, error) { - l := logic.NewRankPvpSubmitLogic(ctx, s.svcCtx) - return l.RankPvpSubmit(in) -} - -func (s *UserCenterServer) UserRankPvp(ctx context.Context, in *pb.UserRankReq) (*pb.UserRankResp, error) { - l := logic.NewUserRankPvpLogic(ctx, s.svcCtx) - return l.UserRankPvp(in) -} - -func (s *UserCenterServer) GiveElite(ctx context.Context, in *pb.GiveEliteReq) (*pb.BuyEliteResp, error) { - l := logic.NewGiveEliteLogic(ctx, s.svcCtx) - return l.GiveElite(in) -} - -func (s *UserCenterServer) BuyElite(ctx context.Context, in *pb.EliteReq) (*pb.BuyEliteResp, error) { - l := logic.NewBuyEliteLogic(ctx, s.svcCtx) - return l.BuyElite(in) -} - -func (s *UserCenterServer) GiveTitle(ctx context.Context, in *pb.GiveTitleReq) (*pb.BuyTitleResp, error) { - l := logic.NewGiveTitleLogic(ctx, s.svcCtx) - return l.GiveTitle(in) -} - -func (s *UserCenterServer) BuyTitle(ctx context.Context, in *pb.TitleReq) (*pb.BuyTitleResp, error) { - l := logic.NewBuyTitleLogic(ctx, s.svcCtx) - return l.BuyTitle(in) -} - -func (s *UserCenterServer) ChangeElite(ctx context.Context, in *pb.EliteReq) (*pb.ChangeEliteResp, error) { - l := logic.NewChangeEliteLogic(ctx, s.svcCtx) - return l.ChangeElite(in) -} - -func (s *UserCenterServer) ChangeTitle(ctx context.Context, in *pb.TitleReq) (*pb.ChangeTitleResp, error) { - l := logic.NewChangeTitleLogic(ctx, s.svcCtx) - return l.ChangeTitle(in) -} diff --git a/app/user_center/internal/svc/service_context.go b/app/user_center/internal/svc/service_context.go deleted file mode 100644 index e714852..0000000 --- a/app/user_center/internal/svc/service_context.go +++ /dev/null @@ -1,13 +0,0 @@ -package svc - -import "dcg/app/user_center/internal/config" - -type ServiceContext struct { - Config config.Config -} - -func NewServiceContext(c config.Config) *ServiceContext { - return &ServiceContext{ - Config: c, - } -} diff --git a/app/user_center/pb/user_center.pb.go b/app/user_center/pb/user_center.pb.go index 87d0cd2..5ec8f41 100644 --- a/app/user_center/pb/user_center.pb.go +++ b/app/user_center/pb/user_center.pb.go @@ -2773,12 +2773,11 @@ type RankPvpSubmitResp_Result struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` - Coin int64 `protobuf:"varint,4,opt,name=coin,proto3" json:"coin,omitempty"` // 获取到的积分数 - Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` // 获取到的称号 - TitleDuration int64 `protobuf:"varint,6,opt,name=titleDuration,proto3" json:"titleDuration,omitempty"` // 称号持续时间(单位: 秒,负数为无限长) + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + Coin int64 `protobuf:"varint,4,opt,name=coin,proto3" json:"coin,omitempty"` // 获取到的积分数 + Title int64 `protobuf:"varint,5,opt,name=title,proto3" json:"title,omitempty"` // 获取到的称号ID } func (x *RankPvpSubmitResp_Result) Reset() { @@ -2841,17 +2840,10 @@ func (x *RankPvpSubmitResp_Result) GetCoin() int64 { return 0 } -func (x *RankPvpSubmitResp_Result) GetTitle() string { +func (x *RankPvpSubmitResp_Result) GetTitle() int64 { if x != nil { return x.Title } - return "" -} - -func (x *RankPvpSubmitResp_Result) GetTitleDuration() int64 { - if x != nil { - return x.TitleDuration - } return 0 } @@ -3209,166 +3201,164 @@ var file_user_center_proto_rawDesc = []byte{ 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, - 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xdb, 0x02, 0x0a, 0x11, 0x52, 0x61, + 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb4, 0x02, 0x0a, 0x11, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x1a, 0xa4, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, - 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x36, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, - 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, - 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, - 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9a, 0x01, 0x0a, - 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, - 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, - 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, - 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x49, 0x74, - 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, - 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x70, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x36, 0x0a, 0x08, 0x45, 0x6c, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, - 0x74, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, - 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, - 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x22, 0x70, 0x0a, 0x0c, 0x42, 0x75, 0x79, - 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x0c, 0x47, - 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x1a, 0x7e, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, - 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, - 0x76, 0x65, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, + 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x1a, 0x6d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, + 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, + 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, + 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, + 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, + 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, + 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x22, 0x36, 0x0a, 0x08, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x69, + 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, + 0x65, 0x72, 0x22, 0x70, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, + 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, + 0x74, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0f, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, + 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x22, 0x84, 0x01, 0x0a, + 0x0c, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, - 0x36, 0x0a, 0x08, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x57, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x2a, 0x28, 0x0a, 0x08, 0x47, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x75, 0x62, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x10, 0x01, 0x32, 0xaf, 0x08, 0x0a, 0x0a, 0x75, - 0x73, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x14, 0x72, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x76, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0e, - 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0d, - 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, - 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, - 0x79, 0x50, 0x55, 0x69, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x75, 0x73, - 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, - 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x70, 0x62, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x09, - 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x67, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x10, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, - 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, - 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x54, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x08, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, + 0x22, 0x57, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x28, 0x0a, 0x08, 0x47, 0x69, 0x66, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, + 0x65, 0x10, 0x01, 0x32, 0xaf, 0x08, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x41, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, + 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0e, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x79, 0x50, 0x55, 0x69, 0x64, 0x12, 0x13, + 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, + 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, - 0x69, 0x66, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, - 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, - 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x74, 0x61, - 0x74, 0x50, 0x76, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, - 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x77, 0x47, - 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, - 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, - 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0e, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, - 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, - 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, - 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, - 0x75, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0f, 0x2e, 0x70, 0x62, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, - 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, - 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, - 0x2e, 0x47, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, - 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x2a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, - 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, - 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, - 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, - 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, - 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, - 0x62, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, - 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, - 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, - 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x0c, + 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, 0x13, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, + 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0f, + 0x75, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, + 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, + 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, + 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x72, + 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x50, + 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, + 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, + 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, + 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x45, + 0x6c, 0x69, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x76, 0x65, 0x45, 0x6c, + 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x45, + 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x45, + 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, + 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, + 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, + 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/app/user_center/pb/user_center.proto b/app/user_center/pb/user_center.proto index 584c9f8..c677ec4 100644 --- a/app/user_center/pb/user_center.proto +++ b/app/user_center/pb/user_center.proto @@ -239,8 +239,7 @@ message RankPvpSubmitResp { string username = 2; string avatar = 3; int64 coin = 4; // 获取到的积分数 - string title = 5; // 获取到的称号 - int64 titleDuration = 6; // 称号持续时间(单位: 秒,负数为无限长) + int64 title = 5; // 获取到的称号ID } message Item { pb.vars.RankType rankType = 1; // 排行榜类型 diff --git a/app/user_center/user_center.go b/app/user_center/user_center.go deleted file mode 100644 index defc1aa..0000000 --- a/app/user_center/user_center.go +++ /dev/null @@ -1,40 +0,0 @@ -package main - -import ( - "flag" - "fmt" - - "dcg/app/user_center/internal/config" - "dcg/app/user_center/internal/server" - "dcg/app/user_center/internal/svc" - "dcg/app/user_center/pb" - - "github.com/zeromicro/go-zero/core/conf" - "github.com/zeromicro/go-zero/core/service" - "github.com/zeromicro/go-zero/zrpc" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" -) - -var configFile = flag.String("f", "etc/user_center.yaml", "the config file") - -func main() { - flag.Parse() - - var c config.Config - conf.MustLoad(*configFile, &c) - ctx := svc.NewServiceContext(c) - svr := server.NewUserCenterServer(ctx) - - s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { - pb.RegisterUserCenterServer(grpcServer, svr) - - if c.Mode == service.DevMode || c.Mode == service.TestMode { - reflection.Register(grpcServer) - } - }) - defer s.Stop() - - fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) - s.Start() -} diff --git a/config-dev.yml b/config-dev.yml index 24285c2..f56b8ce 100644 --- a/config-dev.yml +++ b/config-dev.yml @@ -28,15 +28,17 @@ Kafka: Topic: "notify-user-coin-dev" ConsumerGroup: "notifyUserCoinConsumerG-dev" Game: + # 30213831837876229 地球 + AdminUserId: [30096265903603717, 30213831837876229] Zhg: # 1元=10 Coin (1元40个步兵) CoinFoodRatio: 4 - OutbreakCount: 2 + OutbreakCount: 3 OutbreakBaseCost: 5 OutbreakCostDict: - 1: 4 # 步兵 - 2: 9 # 骑兵 - 3: 5 # 弓箭手 + 1: 3 # 步兵 + 2: 7 # 骑兵 + 3: 4 # 弓箭手 4: 3 # 法师 Zhghz: Zhgfb: @@ -100,7 +102,7 @@ Game: Log: Console: Level: debug - Format: console- + Format: console File: Enabled: false Level: info diff --git a/config.yml b/config.yml index fae34e0..7df8305 100644 --- a/config.yml +++ b/config.yml @@ -15,24 +15,90 @@ Kafka: Addr: [ "127.0.0.1:9093" ] Topic: "gift" ConsumerGroup: "giftToPush" + GuardBuy: + Addr: [ "127.0.0.1:9093" ] + Topic: "guardBuy" + ConsumerGroup: "guardBuyConsumerG" + RewardPool: + Addr: [ "127.0.0.1:9093" ] + Topic: "rewardPool" + ConsumerGroup: "rewardPoolConsumerG" + UserCoin: + Addr: [ "127.0.0.1:9093" ] + Topic: "notify-user-coin" + ConsumerGroup: "notifyUserCoinConsumerG" Game: - ModeDict: - 8722013: 0 - Common: - Commands: [ "q", "查询", "打卡", "签到" ] + # 30213831837876229 地球 + AdminUserId: [30096265903603717, 30213831837876229] Zhg: - Commands: [ "j", "加入", "加入游戏", "s", "w", "我在哪", "s1", "s2", "s3", "s4", "c1", "c2", "c3", "c4", "r1", "r2", "r3", "m1", "m2", "m3" ] - OutbreakCount: 5 - OutbreakBaseCost: 300 + # 1元=10 Coin (1元40个步兵) + CoinFoodRatio: 4 + OutbreakCount: 3 + OutbreakBaseCost: 5 OutbreakCostDict: - 1: 120 # 步兵 - 2: 160 # 骑兵 - 3: 200 # 弓箭手 - 4: 220 # 法师 + 1: 3 # 步兵 + 2: 7 # 骑兵 + 3: 4 # 弓箭手 + 4: 3 # 法师 Zhghz: - Commands: [ "j", "加入", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "w", "我在哪", "m1", "m2", "m3", "m4", "f", "开炮" ] Zhgfb: - Commands: [ ] + Zhgzd: + MaxStrategicPoints: 100 + StrategicRecoverSpeed: 5 + CommandUnitDict: + 1: "0001" + 2: "0004" + 3: "0003" + 4: "0006" + CommandCostDict: + s: + Common: 0 + Units: + "0001": 30 + "0003": 35 + "0004": 30 + "0006": 30 + c: + Common: 5 + r: + Common: 10 + p: + Common: 10 + m: + Common: 5 + DispatchCountDict: + "0001": 5 + "0003": 5 + "0004": 2 + "0006": 5 + GiftEffect: + StrategicMaximal: + # 这个好诶 10电池 1元 + GiftIds: [ 30758,30971,31213,31478 ] + Addon: 10 + Limit: 5 + StrategicRecover: + # 打call 5电池 0.5元 + GiftIds: [ 31278,31037,31212,31485 ] + Addon: 3 + Duration: 5 + Limit: 10 + SupportSkill: + # 辣条随机 免费 + - GiftIds: [ 1 ] + SkillIds: [ "S0001", "S0001", "S0002","S0002", "S0003", "S0005" ] + # 小花花 - 火墙 1电池 0.1元 + - GiftIds: [ 31036, 31476 ] + SkillIds: [ "S0001" ] + # 牛哇牛哇 - 雷击 1电池 0.1元 + - GiftIds: [ 31225, 31214, 31039, 31202, 31477 ] + SkillIds: [ "S0003" ] + # i了i了 - 箭雨 1电池 0.1元 + - GiftIds: [ 31060, 31216 ] + SkillIds: [ "S0002" ] + SuperSkill: + # 干杯 超级技能 + GiftIds: [30606, 31049, 31251, 31116] Log: Console: Level: info diff --git a/config/config.go b/config/config.go index 1697941..4598bdc 100644 --- a/config/config.go +++ b/config/config.go @@ -37,6 +37,7 @@ type ( UserCoin Kafka // 用户金币变动消息 } Game struct { + AdminUserId []int64 // 管理员ID // Zhg 指挥官PvP模式 Zhg struct { CoinFoodRatio float32 // 硬币到粮草的转换系数(乘) diff --git a/game/live_logic/zhg_handler.go b/game/live_logic/zhg_handler.go index 47aeeb2..6b6ba2e 100644 --- a/game/live_logic/zhg_handler.go +++ b/game/live_logic/zhg_handler.go @@ -60,15 +60,19 @@ func NewZhgLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { }, cmd.Pattern{ Prefix: "bw", Alias: []string{"购买精英", "买精英"}, - ContentMaxLen: 1, + ContentMaxLen: 2, }, cmd.Pattern{ Prefix: "zw", Alias: []string{"装备精英"}, - ContentMaxLen: 1, + ContentMaxLen: 2, }, cmd.Pattern{ Prefix: "zz", Alias: []string{"使用称号"}, - ContentMaxLen: 1, + ContentMaxLen: 2, + }, cmd.Pattern{ + Prefix: "结算", + Alias: nil, + ContentMaxLen: 2, }, )), } @@ -84,6 +88,8 @@ func NewZhgLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { resp.RegisterCMDHandler(resp.handleBuyElite, "bw") resp.RegisterCMDHandler(resp.handleChangeElite, "zw") resp.RegisterCMDHandler(resp.handleChangeTitle, "zz") + // + resp.RegisterCMDHandler(resp.handleRankSubmit, "结算") // gift resp.RegisterGiftHandler(resp.handleGift) return resp.LiveGameLogic @@ -103,16 +109,20 @@ func (h *ZhgGameLogic) handleQuery(roomId int64, _ []rune, user *pbCommon.PbUser // details if details, err := h.svcCtx.UserCenterRpc.GetUserDetails(h.svcCtx.Ctx, &usercenter.UserIdReq{UserId: user.UserId}); err == nil { resp.Coin = details.Coin - resp.CurrentTitle = &pbCommon.TitleItem{ - Id: details.CurrentTitle.Id, - Name: details.CurrentTitle.Name, - Sort: details.CurrentTitle.Sort, - Remain: details.CurrentTitle.Remain, + if details.CurrentTitle != nil { + resp.CurrentTitle = &pbCommon.TitleItem{ + Id: details.CurrentTitle.Id, + Name: details.CurrentTitle.Name, + Sort: details.CurrentTitle.Sort, + Remain: details.CurrentTitle.Remain, + } } - resp.CurrentElite = &pbGameZhg.EliteItem{ - Id: details.CurrentElite.Id, - Sort: details.CurrentElite.Sort, - Remain: details.CurrentElite.Remain, + if details.CurrentElite != nil { + resp.CurrentElite = &pbGameZhg.EliteItem{ + Id: details.CurrentElite.Id, + Sort: details.CurrentElite.Sort, + Remain: details.CurrentElite.Remain, + } } resp.Titles = make([]*pbCommon.TitleItem, 0, len(details.Titles)) for _, item := range details.Titles { @@ -166,22 +176,29 @@ func (h *ZhgGameLogic) handleJoinGame(roomId int64, _ []rune, user *pbCommon.PbU return } - room.Broadcast(pb.PushZhgJoinGame, &pbGameZhg.JoinGame{ + resp := &pbGameZhg.JoinGame{ User: user, NobilityLevel: details.NobilityLevel, Coin: details.Coin, - CurrentTitle: &pbCommon.TitleItem{ + } + + if details.CurrentTitle != nil { + resp.CurrentTitle = &pbCommon.TitleItem{ Id: details.CurrentTitle.Id, Name: details.CurrentTitle.Name, Sort: details.CurrentTitle.Sort, Remain: details.CurrentTitle.Remain, - }, - CurrentElite: &pbGameZhg.EliteItem{ + } + } + if details.CurrentElite != nil { + resp.CurrentElite = &pbGameZhg.EliteItem{ Id: details.CurrentElite.Id, Sort: details.CurrentElite.Sort, Remain: details.CurrentElite.Remain, - }, - }) + } + } + + room.Broadcast(pb.PushZhgJoinGame, resp) } func (h *ZhgGameLogic) handleOutbreak(roomId int64, content []rune, user *pbCommon.PbUser) { @@ -408,6 +425,61 @@ func (h *ZhgGameLogic) handleChangeTitle(roomId int64, content []rune, user *pbC room.Broadcast(pb.PushZhgChangeTitle, resp) } +func (h *ZhgGameLogic) handleRankSubmit(roomId int64, content []rune, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + if len(content) == 0 { + return + } + var isAdminUser bool + for _, i := range config.Config.Game.AdminUserId { + if user.UserId == i { + isAdminUser = true + break + } + } + if !isAdminUser { + return + } + rankType := pbVars.RankType_General + if r, err := strconv.ParseInt(string(content), 10, 0); err == nil { + rankType = pbVars.RankType(r) + } + rpcResp, err := h.svcCtx.UserCenterRpc.RankPvpSubmit(h.svcCtx.Ctx, &usercenter.RankPvpSubmitReq{ + RankType: rankType, + AllRankType: false, + }) + if err != nil { + code, msg, _ := grpcx.WrapGrpcErr(err) + logger.SLog.Errorf("结算排行榜时RPC错误 code:[%d] msg:[%s] %v", code, msg, err) + return + } + resp := &pbGameZhg.RankRvpSubmitResult{ + Items: make([]*pbGameZhg.RankRvpSubmitResult_Item, 0, len(rpcResp.Items)), + } + for _, item := range rpcResp.Items { + tmp := &pbGameZhg.RankRvpSubmitResult_Item{ + RankType: item.RankType, + Results: make([]*pbGameZhg.RankRvpSubmitResult_Result, 0, len(item.Results)), + } + for _, result := range item.Results { + tmp.Results = append(tmp.Results, &pbGameZhg.RankRvpSubmitResult_Result{ + UserId: result.UserId, + Username: result.Username, + Avatar: result.Avatar, + Coin: result.Coin, + Title: result.Title, + }) + } + resp.Items = append(resp.Items, tmp) + } + + logger.SLog.Debugf("用户 [%s] 结算排行榜 %d\n%+v", user.Username, rankType, resp) + room.Broadcast(pb.PushZhgRankSubmit, resp) +} + func (h *ZhgGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { // TODO 暂时没有特殊礼物需求,留空 } diff --git a/game/pb/game/zhg/Rank.cs b/game/pb/game/zhg/Rank.cs index 0ca92bc..3d9cdc0 100644 --- a/game/pb/game/zhg/Rank.cs +++ b/game/pb/game/zhg/Rank.cs @@ -30,20 +30,21 @@ namespace Pb.Game.Zhg { "ZRgBIAEoDjIRLnBiLnZhcnMuUmFua1R5cGUSLAoFaXRlbXMYAiADKAsyHS5w", "Yi5nYW1lLnpoZy5SYW5rUHZwUmVzcC5JdGVtGkEKBEl0ZW0SCwoDdWlkGAEg", "ASgDEg0KBXVuYW1lGAIgASgJEg0KBXNjb3JlGAMgASgDEg4KBmF2YXRhchgE", - "IAEoCSL1AQoTUmFua1J2cFN1Ym1pdFJlc3VsdBI0CgVpdGVtcxgBIAMoCzIl", - "LnBiLmdhbWUuemhnLlJhbmtSdnBTdWJtaXRSZXN1bHQuSXRlbRpFCgZSZXdh", - "cmQSCwoDdWlkGAEgASgDEg0KBXVuYW1lGAIgASgJEhAKCGludGVncmFsGAMg", - "ASgDEg0KBXRpdGxlGAQgASgDGmEKBEl0ZW0SHwoEdHlwZRgBIAEoDjIRLnBi", - "LnZhcnMuUmFua1R5cGUSOAoHcmV3YXJkcxgCIAMoCzInLnBiLmdhbWUuemhn", - "LlJhbmtSdnBTdWJtaXRSZXN1bHQuUmV3YXJkQiBaHmRjZy9nYW1lL3BiL2dh", - "bWUvemhnO3BiR2FtZVpoZ2IGcHJvdG8z")); + "IAEoCSKLAgoTUmFua1J2cFN1Ym1pdFJlc3VsdBI0CgVpdGVtcxgBIAMoCzIl", + "LnBiLmdhbWUuemhnLlJhbmtSdnBTdWJtaXRSZXN1bHQuSXRlbRpXCgZSZXN1", + "bHQSDgoGdXNlcklkGAEgASgDEhAKCHVzZXJuYW1lGAIgASgJEg4KBmF2YXRh", + "chgDIAEoCRIMCgRjb2luGAQgASgDEg0KBXRpdGxlGAUgASgDGmUKBEl0ZW0S", + "IwoIcmFua1R5cGUYASABKA4yES5wYi52YXJzLlJhbmtUeXBlEjgKB3Jlc3Vs", + "dHMYAiADKAsyJy5wYi5nYW1lLnpoZy5SYW5rUnZwU3VibWl0UmVzdWx0LlJl", + "c3VsdEIgWh5kY2cvZ2FtZS9wYi9nYW1lL3poZztwYkdhbWVaaGdiBnByb3Rv", + "Mw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Pb.Vars.VarsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpReq), global::Pb.Game.Zhg.RankPvpReq.Parser, new[]{ "Type", "TopN" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp), global::Pb.Game.Zhg.RankPvpResp.Parser, new[]{ "Type", "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp.Types.Item), global::Pb.Game.Zhg.RankPvpResp.Types.Item.Parser, new[]{ "Uid", "Uname", "Score", "Avatar" }, null, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult), global::Pb.Game.Zhg.RankRvpSubmitResult.Parser, new[]{ "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward), global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward.Parser, new[]{ "Uid", "Uname", "Integral", "Title" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item), global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item.Parser, new[]{ "Type", "Rewards" }, null, null, null, null)}) + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult), global::Pb.Game.Zhg.RankRvpSubmitResult.Parser, new[]{ "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Result), global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Result.Parser, new[]{ "UserId", "Username", "Avatar", "Coin", "Title" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item), global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item.Parser, new[]{ "RankType", "Results" }, null, null, null, null)}) })); } #endregion @@ -1001,19 +1002,16 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { - /// - /// Reward 具体奖励 - /// - public sealed partial class Reward : pb::IMessage + public sealed partial class Result : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Reward()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Result()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1029,7 +1027,7 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Reward() { + public Result() { OnConstruction(); } @@ -1037,70 +1035,77 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Reward(Reward other) : this() { - uid_ = other.uid_; - uname_ = other.uname_; - integral_ = other.integral_; + public Result(Result other) : this() { + userId_ = other.userId_; + username_ = other.username_; + avatar_ = other.avatar_; + coin_ = other.coin_; title_ = other.title_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Reward Clone() { - return new Reward(this); + public Result Clone() { + return new Result(this); } - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private long uid_; - /// - /// 用户ID - /// + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private long userId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Uid { - get { return uid_; } + public long UserId { + get { return userId_; } set { - uid_ = value; + userId_ = value; } } - /// Field number for the "uname" field. - public const int UnameFieldNumber = 2; - private string uname_ = ""; - /// - /// 用户名称 - /// + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Uname { - get { return uname_; } + public string Username { + get { return username_; } set { - uname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "integral" field. - public const int IntegralFieldNumber = 3; - private long integral_; + /// Field number for the "avatar" field. + public const int AvatarFieldNumber = 3; + private string avatar_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Avatar { + get { return avatar_; } + set { + avatar_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "coin" field. + public const int CoinFieldNumber = 4; + private long coin_; /// - /// 积分奖励 + /// 获取到的积分数 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Integral { - get { return integral_; } + public long Coin { + get { return coin_; } set { - integral_ = value; + coin_ = value; } } /// Field number for the "title" field. - public const int TitleFieldNumber = 4; + public const int TitleFieldNumber = 5; private long title_; /// - /// 称号奖励(称号ID列表) + /// 获取到的称号ID /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1114,21 +1119,22 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Reward); + return Equals(other as Result); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(Reward other) { + public bool Equals(Result other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Uid != other.Uid) return false; - if (Uname != other.Uname) return false; - if (Integral != other.Integral) return false; + if (UserId != other.UserId) return false; + if (Username != other.Username) return false; + if (Avatar != other.Avatar) return false; + if (Coin != other.Coin) return false; if (Title != other.Title) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1137,9 +1143,10 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Uid != 0L) hash ^= Uid.GetHashCode(); - if (Uname.Length != 0) hash ^= Uname.GetHashCode(); - if (Integral != 0L) hash ^= Integral.GetHashCode(); + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Avatar.Length != 0) hash ^= Avatar.GetHashCode(); + if (Coin != 0L) hash ^= Coin.GetHashCode(); if (Title != 0L) hash ^= Title.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -1159,20 +1166,24 @@ namespace Pb.Game.Zhg { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Uid != 0L) { + if (UserId != 0L) { output.WriteRawTag(8); - output.WriteInt64(Uid); + output.WriteInt64(UserId); } - if (Uname.Length != 0) { + if (Username.Length != 0) { output.WriteRawTag(18); - output.WriteString(Uname); + output.WriteString(Username); } - if (Integral != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Integral); + if (Avatar.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Avatar); } - if (Title != 0L) { + if (Coin != 0L) { output.WriteRawTag(32); + output.WriteInt64(Coin); + } + if (Title != 0L) { + output.WriteRawTag(40); output.WriteInt64(Title); } if (_unknownFields != null) { @@ -1185,20 +1196,24 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Uid != 0L) { + if (UserId != 0L) { output.WriteRawTag(8); - output.WriteInt64(Uid); + output.WriteInt64(UserId); } - if (Uname.Length != 0) { + if (Username.Length != 0) { output.WriteRawTag(18); - output.WriteString(Uname); + output.WriteString(Username); } - if (Integral != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Integral); + if (Avatar.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Avatar); } - if (Title != 0L) { + if (Coin != 0L) { output.WriteRawTag(32); + output.WriteInt64(Coin); + } + if (Title != 0L) { + output.WriteRawTag(40); output.WriteInt64(Title); } if (_unknownFields != null) { @@ -1211,14 +1226,17 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Uid != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Uid); + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); } - if (Uname.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Uname); + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); } - if (Integral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); + if (Avatar.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Avatar); + } + if (Coin != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Coin); } if (Title != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(Title); @@ -1231,18 +1249,21 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(Reward other) { + public void MergeFrom(Result other) { if (other == null) { return; } - if (other.Uid != 0L) { - Uid = other.Uid; + if (other.UserId != 0L) { + UserId = other.UserId; } - if (other.Uname.Length != 0) { - Uname = other.Uname; + if (other.Username.Length != 0) { + Username = other.Username; } - if (other.Integral != 0L) { - Integral = other.Integral; + if (other.Avatar.Length != 0) { + Avatar = other.Avatar; + } + if (other.Coin != 0L) { + Coin = other.Coin; } if (other.Title != 0L) { Title = other.Title; @@ -1263,18 +1284,22 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Uid = input.ReadInt64(); + UserId = input.ReadInt64(); break; } case 18: { - Uname = input.ReadString(); + Username = input.ReadString(); break; } - case 24: { - Integral = input.ReadInt64(); + case 26: { + Avatar = input.ReadString(); break; } case 32: { + Coin = input.ReadInt64(); + break; + } + case 40: { Title = input.ReadInt64(); break; } @@ -1294,18 +1319,22 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - Uid = input.ReadInt64(); + UserId = input.ReadInt64(); break; } case 18: { - Uname = input.ReadString(); + Username = input.ReadString(); break; } - case 24: { - Integral = input.ReadInt64(); + case 26: { + Avatar = input.ReadString(); break; } case 32: { + Coin = input.ReadInt64(); + break; + } + case 40: { Title = input.ReadInt64(); break; } @@ -1316,9 +1345,6 @@ namespace Pb.Game.Zhg { } - /// - /// Item 奖励项 - /// public sealed partial class Item : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -1353,8 +1379,8 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Item(Item other) : this() { - type_ = other.type_; - rewards_ = other.rewards_.Clone(); + rankType_ = other.rankType_; + results_ = other.results_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1364,33 +1390,33 @@ namespace Pb.Game.Zhg { return new Item(this); } - /// Field number for the "type" field. - public const int TypeFieldNumber = 1; - private global::Pb.Vars.RankType type_ = global::Pb.Vars.RankType.Unknown; + /// Field number for the "rankType" field. + public const int RankTypeFieldNumber = 1; + private global::Pb.Vars.RankType rankType_ = global::Pb.Vars.RankType.Unknown; /// - /// 榜单类型 + /// 排行榜类型 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Vars.RankType Type { - get { return type_; } + public global::Pb.Vars.RankType RankType { + get { return rankType_; } set { - type_ = value; + rankType_ = value; } } - /// Field number for the "rewards" field. - public const int RewardsFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_rewards_codec - = pb::FieldCodec.ForMessage(18, global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward.Parser); - private readonly pbc::RepeatedField rewards_ = new pbc::RepeatedField(); + /// Field number for the "results" field. + public const int ResultsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_results_codec + = pb::FieldCodec.ForMessage(18, global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Result.Parser); + private readonly pbc::RepeatedField results_ = new pbc::RepeatedField(); /// - /// 奖励项 + /// 上榜玩家? /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Rewards { - get { return rewards_; } + public pbc::RepeatedField Results { + get { return results_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1408,8 +1434,8 @@ namespace Pb.Game.Zhg { if (ReferenceEquals(other, this)) { return true; } - if (Type != other.Type) return false; - if(!rewards_.Equals(other.rewards_)) return false; + if (RankType != other.RankType) return false; + if(!results_.Equals(other.results_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1417,8 +1443,8 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Type != global::Pb.Vars.RankType.Unknown) hash ^= Type.GetHashCode(); - hash ^= rewards_.GetHashCode(); + if (RankType != global::Pb.Vars.RankType.Unknown) hash ^= RankType.GetHashCode(); + hash ^= results_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1437,11 +1463,11 @@ namespace Pb.Game.Zhg { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Type != global::Pb.Vars.RankType.Unknown) { + if (RankType != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteEnum((int) Type); + output.WriteEnum((int) RankType); } - rewards_.WriteTo(output, _repeated_rewards_codec); + results_.WriteTo(output, _repeated_results_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1452,11 +1478,11 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Type != global::Pb.Vars.RankType.Unknown) { + if (RankType != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteEnum((int) Type); + output.WriteEnum((int) RankType); } - rewards_.WriteTo(ref output, _repeated_rewards_codec); + results_.WriteTo(ref output, _repeated_results_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1467,10 +1493,10 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Type != global::Pb.Vars.RankType.Unknown) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + if (RankType != global::Pb.Vars.RankType.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RankType); } - size += rewards_.CalculateSize(_repeated_rewards_codec); + size += results_.CalculateSize(_repeated_results_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1483,10 +1509,10 @@ namespace Pb.Game.Zhg { if (other == null) { return; } - if (other.Type != global::Pb.Vars.RankType.Unknown) { - Type = other.Type; + if (other.RankType != global::Pb.Vars.RankType.Unknown) { + RankType = other.RankType; } - rewards_.Add(other.rewards_); + results_.Add(other.results_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1503,11 +1529,11 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Type = (global::Pb.Vars.RankType) input.ReadEnum(); + RankType = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 18: { - rewards_.AddEntriesFrom(input, _repeated_rewards_codec); + results_.AddEntriesFrom(input, _repeated_results_codec); break; } } @@ -1526,11 +1552,11 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - Type = (global::Pb.Vars.RankType) input.ReadEnum(); + RankType = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 18: { - rewards_.AddEntriesFrom(ref input, _repeated_rewards_codec); + results_.AddEntriesFrom(ref input, _repeated_results_codec); break; } } diff --git a/game/pb/game/zhg/rank.pb.go b/game/pb/game/zhg/rank.pb.go index 2edb555..5691b80 100644 --- a/game/pb/game/zhg/rank.pb.go +++ b/game/pb/game/zhg/rank.pb.go @@ -252,20 +252,20 @@ func (x *RankPvpResp_Item) GetAvatar() string { return "" } -// Reward 具体奖励 -type RankRvpSubmitResult_Reward struct { +type RankRvpSubmitResult_Result struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名称 - Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral,omitempty"` // 积分奖励 - Title int64 `protobuf:"varint,4,opt,name=title,proto3" json:"title,omitempty"` // 称号奖励(称号ID列表) + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + Coin int64 `protobuf:"varint,4,opt,name=coin,proto3" json:"coin,omitempty"` // 获取到的积分数 + Title int64 `protobuf:"varint,5,opt,name=title,proto3" json:"title,omitempty"` // 获取到的称号ID } -func (x *RankRvpSubmitResult_Reward) Reset() { - *x = RankRvpSubmitResult_Reward{} +func (x *RankRvpSubmitResult_Result) Reset() { + *x = RankRvpSubmitResult_Result{} if protoimpl.UnsafeEnabled { mi := &file_game_zhg_rank_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -273,13 +273,13 @@ func (x *RankRvpSubmitResult_Reward) Reset() { } } -func (x *RankRvpSubmitResult_Reward) String() string { +func (x *RankRvpSubmitResult_Result) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RankRvpSubmitResult_Reward) ProtoMessage() {} +func (*RankRvpSubmitResult_Result) ProtoMessage() {} -func (x *RankRvpSubmitResult_Reward) ProtoReflect() protoreflect.Message { +func (x *RankRvpSubmitResult_Result) ProtoReflect() protoreflect.Message { mi := &file_game_zhg_rank_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -291,47 +291,53 @@ func (x *RankRvpSubmitResult_Reward) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RankRvpSubmitResult_Reward.ProtoReflect.Descriptor instead. -func (*RankRvpSubmitResult_Reward) Descriptor() ([]byte, []int) { +// Deprecated: Use RankRvpSubmitResult_Result.ProtoReflect.Descriptor instead. +func (*RankRvpSubmitResult_Result) Descriptor() ([]byte, []int) { return file_game_zhg_rank_proto_rawDescGZIP(), []int{2, 0} } -func (x *RankRvpSubmitResult_Reward) GetUid() int64 { +func (x *RankRvpSubmitResult_Result) GetUserId() int64 { if x != nil { - return x.Uid + return x.UserId } return 0 } -func (x *RankRvpSubmitResult_Reward) GetUname() string { +func (x *RankRvpSubmitResult_Result) GetUsername() string { if x != nil { - return x.Uname + return x.Username } return "" } -func (x *RankRvpSubmitResult_Reward) GetIntegral() int64 { +func (x *RankRvpSubmitResult_Result) GetAvatar() string { if x != nil { - return x.Integral + return x.Avatar + } + return "" +} + +func (x *RankRvpSubmitResult_Result) GetCoin() int64 { + if x != nil { + return x.Coin } return 0 } -func (x *RankRvpSubmitResult_Reward) GetTitle() int64 { +func (x *RankRvpSubmitResult_Result) GetTitle() int64 { if x != nil { return x.Title } return 0 } -// Item 奖励项 type RankRvpSubmitResult_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type vars.RankType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.vars.RankType" json:"type,omitempty"` // 榜单类型 - Rewards []*RankRvpSubmitResult_Reward `protobuf:"bytes,2,rep,name=rewards,proto3" json:"rewards,omitempty"` // 奖励项 + RankType vars.RankType `protobuf:"varint,1,opt,name=rankType,proto3,enum=pb.vars.RankType" json:"rankType,omitempty"` // 排行榜类型 + Results []*RankRvpSubmitResult_Result `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // 上榜玩家? } func (x *RankRvpSubmitResult_Item) Reset() { @@ -366,16 +372,16 @@ func (*RankRvpSubmitResult_Item) Descriptor() ([]byte, []int) { return file_game_zhg_rank_proto_rawDescGZIP(), []int{2, 1} } -func (x *RankRvpSubmitResult_Item) GetType() vars.RankType { +func (x *RankRvpSubmitResult_Item) GetRankType() vars.RankType { if x != nil { - return x.Type + return x.RankType } return vars.RankType(0) } -func (x *RankRvpSubmitResult_Item) GetRewards() []*RankRvpSubmitResult_Reward { +func (x *RankRvpSubmitResult_Item) GetResults() []*RankRvpSubmitResult_Result { if x != nil { - return x.Rewards + return x.Results } return nil } @@ -403,28 +409,30 @@ var file_game_zhg_rank_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0xa8, 0x02, 0x0a, 0x13, 0x52, 0x61, 0x6e, 0x6b, 0x52, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0xcc, 0x02, 0x0a, 0x13, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, - 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x62, 0x0a, 0x06, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x1a, - 0x70, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x7e, 0x0a, 0x06, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x1a, 0x78, 0x0a, 0x04, 0x49, + 0x74, 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, - 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, - 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, - 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x42, 0x20, 0x5a, 0x1e, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, - 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, - 0x5a, 0x68, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, + 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x20, 0x5a, 0x1e, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, + 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x3b, 0x70, 0x62, + 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -445,7 +453,7 @@ var file_game_zhg_rank_proto_goTypes = []interface{}{ (*RankPvpResp)(nil), // 1: pb.game.zhg.RankPvpResp (*RankRvpSubmitResult)(nil), // 2: pb.game.zhg.RankRvpSubmitResult (*RankPvpResp_Item)(nil), // 3: pb.game.zhg.RankPvpResp.Item - (*RankRvpSubmitResult_Reward)(nil), // 4: pb.game.zhg.RankRvpSubmitResult.Reward + (*RankRvpSubmitResult_Result)(nil), // 4: pb.game.zhg.RankRvpSubmitResult.Result (*RankRvpSubmitResult_Item)(nil), // 5: pb.game.zhg.RankRvpSubmitResult.Item (vars.RankType)(0), // 6: pb.vars.RankType } @@ -454,8 +462,8 @@ var file_game_zhg_rank_proto_depIdxs = []int32{ 6, // 1: pb.game.zhg.RankPvpResp.type:type_name -> pb.vars.RankType 3, // 2: pb.game.zhg.RankPvpResp.items:type_name -> pb.game.zhg.RankPvpResp.Item 5, // 3: pb.game.zhg.RankRvpSubmitResult.items:type_name -> pb.game.zhg.RankRvpSubmitResult.Item - 6, // 4: pb.game.zhg.RankRvpSubmitResult.Item.type:type_name -> pb.vars.RankType - 4, // 5: pb.game.zhg.RankRvpSubmitResult.Item.rewards:type_name -> pb.game.zhg.RankRvpSubmitResult.Reward + 6, // 4: pb.game.zhg.RankRvpSubmitResult.Item.rankType:type_name -> pb.vars.RankType + 4, // 5: pb.game.zhg.RankRvpSubmitResult.Item.results:type_name -> pb.game.zhg.RankRvpSubmitResult.Result 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -518,7 +526,7 @@ func file_game_zhg_rank_proto_init() { } } file_game_zhg_rank_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankRvpSubmitResult_Reward); i { + switch v := v.(*RankRvpSubmitResult_Result); i { case 0: return &v.state case 1: diff --git a/game/pb/game/zhg/rank.proto b/game/pb/game/zhg/rank.proto index d9e241e..9ba8e66 100644 --- a/game/pb/game/zhg/rank.proto +++ b/game/pb/game/zhg/rank.proto @@ -26,17 +26,16 @@ message RankPvpResp { // RankRvpSubmitResult 排行榜结算结果通知 push -> rank.submit 命令(排行榜结算) message RankRvpSubmitResult { - // Reward 具体奖励 - message Reward { - int64 uid = 1; // 用户ID - string uname = 2; // 用户名称 - int64 integral = 3; // 积分奖励 - int64 title = 4; // 称号奖励(称号ID列表) + message Result { + int64 userId = 1; + string username = 2; + string avatar = 3; + int64 coin = 4; // 获取到的积分数 + int64 title = 5; // 获取到的称号ID } - // Item 奖励项 message Item { - pb.vars.RankType type = 1; // 榜单类型 - repeated Reward rewards = 2; // 奖励项 + pb.vars.RankType rankType = 1; // 排行榜类型 + repeated Result results = 2; // 上榜玩家? } repeated Item items = 1; } \ No newline at end of file diff --git a/game/pb/routes.go b/game/pb/routes.go index 76c619c..d347db5 100644 --- a/game/pb/routes.go +++ b/game/pb/routes.go @@ -26,6 +26,7 @@ const ( PushZhgChangeElite = "game.change.elite" PushZhgChangeTitle = "game.change.title" PushZhgBuyFood = "game.buy.food" + PushZhgRankSubmit = "game.rank.submit" ) // zhgzd