|
|
|
// Code generated by goctl. DO NOT EDIT!
|
|
|
|
// Source: user_center.proto
|
|
|
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"live-service/app/user_center/rpc/internal/logic/gift"
|
|
|
|
"live-service/app/user_center/rpc/internal/logic/integral"
|
|
|
|
"live-service/app/user_center/rpc/internal/logic/rank"
|
|
|
|
"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/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)
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ChangeIntegral 新增用户积分
|
|
|
|
func (s *UserCenterServer) ChangeIntegral(ctx context.Context, in *pb.ChangeIntegralReq) (*pb.ChangeIntegralResp, error) {
|
|
|
|
l := integral.NewChangeIntegralLogic(ctx, s.svcCtx)
|
|
|
|
return l.ChangeIntegral(in)
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetUserIntegral 获取用户积分
|
|
|
|
func (s *UserCenterServer) GetUserIntegral(ctx context.Context, in *pb.UserIdReq) (*pb.UserIntegralResp, error) {
|
|
|
|
l := integral.NewGetUserIntegralLogic(ctx, s.svcCtx)
|
|
|
|
return l.GetUserIntegral(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)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UserSendGift 用户赠送礼物
|
|
|
|
func (s *UserCenterServer) UserSendGift(ctx context.Context, in *pb.UserSendGiftReq) (*pb.UserSendGiftResp, error) {
|
|
|
|
l := gift.NewUserSendGiftLogic(ctx, s.svcCtx)
|
|
|
|
return l.UserSendGift(in)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UserCenterServer) UserBuyNobility(ctx context.Context, in *pb.UserBuyNobilityReq) (*pb.UserBuyNobilityResp, error) {
|
|
|
|
l := gift.NewUserBuyNobilityLogic(ctx, s.svcCtx)
|
|
|
|
return l.UserBuyNobility(in)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UserCenterServer) StatPvpKill(ctx context.Context, in *pb.StatPvPKillReq) (*pb.Empty, error) {
|
|
|
|
l := statistics.NewStatPvpKillLogic(ctx, s.svcCtx)
|
|
|
|
return l.StatPvpKill(in)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UserCenterServer) StatPvpFirstBlood(ctx context.Context, in *pb.StatPvPFirstBloodReq) (*pb.Empty, error) {
|
|
|
|
l := statistics.NewStatPvpFirstBloodLogic(ctx, s.svcCtx)
|
|
|
|
return l.StatPvpFirstBlood(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)
|
|
|
|
}
|
|
|
|
|
|
|
|
// rankPvp pvp排行
|
|
|
|
func (s *UserCenterServer) RankPvp(ctx context.Context, in *pb.RankPvpReq) (*pb.RankPvpResp, error) {
|
|
|
|
l := rank.NewRankPvpLogic(ctx, s.svcCtx)
|
|
|
|
return l.RankPvp(in)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UserCenterServer) RankPvpSubmit(ctx context.Context, in *pb.RankPvpSubmitReq) (*pb.RankPvpSubmitResp, error) {
|
|
|
|
l := rank.NewRankPvpSubmitLogic(ctx, s.svcCtx)
|
|
|
|
return l.RankPvpSubmit(in)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *UserCenterServer) UserRankPvp(ctx context.Context, in *pb.UserRankReq) (*pb.UserRankResp, error) {
|
|
|
|
l := rank.NewUserRankPvpLogic(ctx, s.svcCtx)
|
|
|
|
return l.UserRankPvp(in)
|
|
|
|
}
|