You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.9 KiB
Go

// Code generated by goctl. DO NOT EDIT!
// Source: user_center.proto
package server
import (
"context"
"live-service/app/user_center/rpc/internal/logic/coin"
"live-service/app/user_center/rpc/internal/logic/gift"
"live-service/app/user_center/rpc/internal/logic/statistics"
"live-service/app/user_center/rpc/internal/logic/user"
"live-service/app/user_center/rpc/internal/logic/zhg"
"live-service/app/user_center/rpc/internal/svc"
"live-service/app/user_center/rpc/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 := user.NewRetrievePlatformUserLogic(ctx, s.svcCtx)
return l.RetrievePlatformUser(in)
}
// getUserDetails 获取用户详细信息
func (s *UserCenterServer) GetUserDetails(ctx context.Context, in *pb.UserIdReq) (*pb.UserDetailsResp, error) {
l := user.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 := user.NewGetUserIdByPUidLogic(ctx, s.svcCtx)
return l.GetUserIdByPUid(in)
}
// UserCheckIn 用户签到|打卡
func (s *UserCenterServer) UserCheckIn(ctx context.Context, in *pb.UserIdReq) (*pb.UserCheckInResp, error) {
l := user.NewUserCheckInLogic(ctx, s.svcCtx)
return l.UserCheckIn(in)
}
// changeCoin 新增或扣减用户弹币
func (s *UserCenterServer) ChangeCoin(ctx context.Context, in *pb.ChangeCoinReq) (*pb.Empty, error) {
l := coin.NewChangeCoinLogic(ctx, s.svcCtx)
return l.ChangeCoin(in)
}
// getUserCoin 获取用户弹币
func (s *UserCenterServer) GetUserCoin(ctx context.Context, in *pb.UserIdReq) (*pb.GetUserCoinResp, error) {
l := coin.NewGetUserCoinLogic(ctx, s.svcCtx)
return l.GetUserCoin(in)
}
// transferUserCoin 转移用户弹币
func (s *UserCenterServer) TransferUserCoin(ctx context.Context, in *pb.TransferUserCoinReq) (*pb.TransferUserCoinResp, error) {
l := coin.NewTransferUserCoinLogic(ctx, s.svcCtx)
return l.TransferUserCoin(in)
}
// UserSendGift 用户赠送礼物
func (s *UserCenterServer) UserSendGift(ctx context.Context, in *pb.UserSendGiftReq) (*pb.Empty, error) {
l := gift.NewUserSendGiftLogic(ctx, s.svcCtx)
return l.UserSendGift(in)
}
func (s *UserCenterServer) UserBuyNobility(ctx context.Context, in *pb.UserBuyNobilityReq) (*pb.Empty, error) {
l := gift.NewUserBuyNobilityLogic(ctx, s.svcCtx)
return l.UserBuyNobility(in)
}
func (s *UserCenterServer) StatPvpReport(ctx context.Context, in *pb.StatPvPReportReq) (*pb.StatPvPReportResp, error) {
l := statistics.NewStatPvpReportLogic(ctx, s.svcCtx)
return l.StatPvpReport(in)
}
func (s *UserCenterServer) DrawGiftPack(ctx context.Context, in *pb.DrawGiftPackReq) (*pb.DrawGiftPackResp, error) {
l := gift.NewDrawGiftPackLogic(ctx, s.svcCtx)
return l.DrawGiftPack(in)
}
// @ZeroGroup: grade
func (s *UserCenterServer) GetUserGrade(ctx context.Context, in *pb.UserIdReq) (*pb.UserGradeResp, error) {
l := user.NewGetUserGradeLogic(ctx, s.svcCtx)
return l.GetUserGrade(in)
}
// rankPvp pvp排行
func (s *UserCenterServer) RankPvp(ctx context.Context, in *pb.RankPvpReq) (*pb.RankPvpResp, error) {
l := statistics.NewRankPvpLogic(ctx, s.svcCtx)
return l.RankPvp(in)
}
func (s *UserCenterServer) RankPvpSubmit(ctx context.Context, in *pb.RankPvpSubmitReq) (*pb.RankPvpSubmitResp, error) {
l := statistics.NewRankPvpSubmitLogic(ctx, s.svcCtx)
return l.RankPvpSubmit(in)
}
func (s *UserCenterServer) UserRankPvp(ctx context.Context, in *pb.UserRankReq) (*pb.UserRankResp, error) {
l := statistics.NewUserRankPvpLogic(ctx, s.svcCtx)
return l.UserRankPvp(in)
}
func (s *UserCenterServer) GiveElite(ctx context.Context, in *pb.GiveEliteReq) (*pb.BuyEliteResp, error) {
l := zhg.NewGiveEliteLogic(ctx, s.svcCtx)
return l.GiveElite(in)
}
func (s *UserCenterServer) BuyElite(ctx context.Context, in *pb.EliteReq) (*pb.BuyEliteResp, error) {
l := zhg.NewBuyEliteLogic(ctx, s.svcCtx)
return l.BuyElite(in)
}
func (s *UserCenterServer) GiveTitle(ctx context.Context, in *pb.GiveTitleReq) (*pb.BuyTitleResp, error) {
l := zhg.NewGiveTitleLogic(ctx, s.svcCtx)
return l.GiveTitle(in)
}
func (s *UserCenterServer) BuyTitle(ctx context.Context, in *pb.TitleReq) (*pb.BuyTitleResp, error) {
l := zhg.NewBuyTitleLogic(ctx, s.svcCtx)
return l.BuyTitle(in)
}
func (s *UserCenterServer) ChangeElite(ctx context.Context, in *pb.EliteReq) (*pb.ChangeEliteResp, error) {
l := zhg.NewChangeEliteLogic(ctx, s.svcCtx)
return l.ChangeElite(in)
}
func (s *UserCenterServer) ChangeTitle(ctx context.Context, in *pb.TitleReq) (*pb.ChangeTitleResp, error) {
l := zhg.NewChangeTitleLogic(ctx, s.svcCtx)
return l.ChangeTitle(in)
}