|
|
@ -29,13 +29,15 @@ type UserCenterClient interface {
|
|
|
|
//ChangeIntegral 新增用户积分
|
|
|
|
//ChangeIntegral 新增用户积分
|
|
|
|
ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error)
|
|
|
|
ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error)
|
|
|
|
//GetUserIntegral 获取用户积分
|
|
|
|
//GetUserIntegral 获取用户积分
|
|
|
|
GetUserIntegral(ctx context.Context, in *UserIdResp, opts ...grpc.CallOption) (*UserIntegralResp, error)
|
|
|
|
GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error)
|
|
|
|
|
|
|
|
//UserCheckIn 用户签到|打卡
|
|
|
|
|
|
|
|
UserCheckIn(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserCheckInResp, error)
|
|
|
|
// UserSendGift 用户赠送礼物
|
|
|
|
// UserSendGift 用户赠送礼物
|
|
|
|
UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error)
|
|
|
|
UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error)
|
|
|
|
UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error)
|
|
|
|
UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error)
|
|
|
|
StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error)
|
|
|
|
StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error)
|
|
|
|
StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error)
|
|
|
|
StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error)
|
|
|
|
StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*Empty, error)
|
|
|
|
StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error)
|
|
|
|
// rankPvp pvp排行
|
|
|
|
// rankPvp pvp排行
|
|
|
|
RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error)
|
|
|
|
RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -75,7 +77,7 @@ func (c *userCenterClient) ChangeIntegral(ctx context.Context, in *ChangeIntegra
|
|
|
|
return out, nil
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (c *userCenterClient) GetUserIntegral(ctx context.Context, in *UserIdResp, opts ...grpc.CallOption) (*UserIntegralResp, error) {
|
|
|
|
func (c *userCenterClient) GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error) {
|
|
|
|
out := new(UserIntegralResp)
|
|
|
|
out := new(UserIntegralResp)
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/GetUserIntegral", in, out, opts...)
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/GetUserIntegral", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -84,6 +86,15 @@ func (c *userCenterClient) GetUserIntegral(ctx context.Context, in *UserIdResp,
|
|
|
|
return out, nil
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (c *userCenterClient) UserCheckIn(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserCheckInResp, error) {
|
|
|
|
|
|
|
|
out := new(UserCheckInResp)
|
|
|
|
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/UserCheckIn", in, out, opts...)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return out, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (c *userCenterClient) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) {
|
|
|
|
func (c *userCenterClient) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) {
|
|
|
|
out := new(UserSendGiftResp)
|
|
|
|
out := new(UserSendGiftResp)
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/userSendGift", in, out, opts...)
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/userSendGift", in, out, opts...)
|
|
|
@ -120,8 +131,8 @@ func (c *userCenterClient) StatPvpFirstBlood(ctx context.Context, in *StatPvPFir
|
|
|
|
return out, nil
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (c *userCenterClient) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
|
|
func (c *userCenterClient) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error) {
|
|
|
|
out := new(Empty)
|
|
|
|
out := new(StatPvPReportResp)
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/statPvpReport", in, out, opts...)
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/statPvpReport", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
@ -149,13 +160,15 @@ type UserCenterServer interface {
|
|
|
|
//ChangeIntegral 新增用户积分
|
|
|
|
//ChangeIntegral 新增用户积分
|
|
|
|
ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error)
|
|
|
|
ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error)
|
|
|
|
//GetUserIntegral 获取用户积分
|
|
|
|
//GetUserIntegral 获取用户积分
|
|
|
|
GetUserIntegral(context.Context, *UserIdResp) (*UserIntegralResp, error)
|
|
|
|
GetUserIntegral(context.Context, *UserIdReq) (*UserIntegralResp, error)
|
|
|
|
|
|
|
|
//UserCheckIn 用户签到|打卡
|
|
|
|
|
|
|
|
UserCheckIn(context.Context, *UserIdReq) (*UserCheckInResp, error)
|
|
|
|
// UserSendGift 用户赠送礼物
|
|
|
|
// UserSendGift 用户赠送礼物
|
|
|
|
UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error)
|
|
|
|
UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error)
|
|
|
|
UserBuyNobility(context.Context, *UserBuyNobilityReq) (*UserBuyNobilityResp, error)
|
|
|
|
UserBuyNobility(context.Context, *UserBuyNobilityReq) (*UserBuyNobilityResp, error)
|
|
|
|
StatPvpKill(context.Context, *StatPvPKillReq) (*Empty, error)
|
|
|
|
StatPvpKill(context.Context, *StatPvPKillReq) (*Empty, error)
|
|
|
|
StatPvpFirstBlood(context.Context, *StatPvPFirstBloodReq) (*Empty, error)
|
|
|
|
StatPvpFirstBlood(context.Context, *StatPvPFirstBloodReq) (*Empty, error)
|
|
|
|
StatPvpReport(context.Context, *StatPvPReportReq) (*Empty, error)
|
|
|
|
StatPvpReport(context.Context, *StatPvPReportReq) (*StatPvPReportResp, error)
|
|
|
|
// rankPvp pvp排行
|
|
|
|
// rankPvp pvp排行
|
|
|
|
RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error)
|
|
|
|
RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error)
|
|
|
|
mustEmbedUnimplementedUserCenterServer()
|
|
|
|
mustEmbedUnimplementedUserCenterServer()
|
|
|
@ -174,9 +187,12 @@ func (UnimplementedUserCenterServer) GetUserIdByPUid(context.Context, *PlatformU
|
|
|
|
func (UnimplementedUserCenterServer) ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error) {
|
|
|
|
func (UnimplementedUserCenterServer) ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ChangeIntegral not implemented")
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ChangeIntegral not implemented")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (UnimplementedUserCenterServer) GetUserIntegral(context.Context, *UserIdResp) (*UserIntegralResp, error) {
|
|
|
|
func (UnimplementedUserCenterServer) GetUserIntegral(context.Context, *UserIdReq) (*UserIntegralResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserIntegral not implemented")
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserIntegral not implemented")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (UnimplementedUserCenterServer) UserCheckIn(context.Context, *UserIdReq) (*UserCheckInResp, error) {
|
|
|
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method UserCheckIn not implemented")
|
|
|
|
|
|
|
|
}
|
|
|
|
func (UnimplementedUserCenterServer) UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error) {
|
|
|
|
func (UnimplementedUserCenterServer) UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method UserSendGift not implemented")
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method UserSendGift not implemented")
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -189,7 +205,7 @@ func (UnimplementedUserCenterServer) StatPvpKill(context.Context, *StatPvPKillRe
|
|
|
|
func (UnimplementedUserCenterServer) StatPvpFirstBlood(context.Context, *StatPvPFirstBloodReq) (*Empty, error) {
|
|
|
|
func (UnimplementedUserCenterServer) StatPvpFirstBlood(context.Context, *StatPvPFirstBloodReq) (*Empty, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatPvpFirstBlood not implemented")
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatPvpFirstBlood not implemented")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (UnimplementedUserCenterServer) StatPvpReport(context.Context, *StatPvPReportReq) (*Empty, error) {
|
|
|
|
func (UnimplementedUserCenterServer) StatPvpReport(context.Context, *StatPvPReportReq) (*StatPvPReportResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatPvpReport not implemented")
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method StatPvpReport not implemented")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (UnimplementedUserCenterServer) RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error) {
|
|
|
|
func (UnimplementedUserCenterServer) RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error) {
|
|
|
@ -263,7 +279,7 @@ func _UserCenter_ChangeIntegral_Handler(srv interface{}, ctx context.Context, de
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func _UserCenter_GetUserIntegral_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
func _UserCenter_GetUserIntegral_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(UserIdResp)
|
|
|
|
in := new(UserIdReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -275,7 +291,25 @@ func _UserCenter_GetUserIntegral_Handler(srv interface{}, ctx context.Context, d
|
|
|
|
FullMethod: "/pb.userCenter/GetUserIntegral",
|
|
|
|
FullMethod: "/pb.userCenter/GetUserIntegral",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(UserCenterServer).GetUserIntegral(ctx, req.(*UserIdResp))
|
|
|
|
return srv.(UserCenterServer).GetUserIntegral(ctx, req.(*UserIdReq))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _UserCenter_UserCheckIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
|
|
|
in := new(UserIdReq)
|
|
|
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
|
|
|
return srv.(UserCenterServer).UserCheckIn(ctx, in)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
|
|
|
Server: srv,
|
|
|
|
|
|
|
|
FullMethod: "/pb.userCenter/UserCheckIn",
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
|
|
|
return srv.(UserCenterServer).UserCheckIn(ctx, req.(*UserIdReq))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -411,6 +445,10 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{
|
|
|
|
MethodName: "GetUserIntegral",
|
|
|
|
MethodName: "GetUserIntegral",
|
|
|
|
Handler: _UserCenter_GetUserIntegral_Handler,
|
|
|
|
Handler: _UserCenter_GetUserIntegral_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MethodName: "UserCheckIn",
|
|
|
|
|
|
|
|
Handler: _UserCenter_UserCheckIn_Handler,
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MethodName: "userSendGift",
|
|
|
|
MethodName: "userSendGift",
|
|
|
|
Handler: _UserCenter_UserSendGift_Handler,
|
|
|
|
Handler: _UserCenter_UserSendGift_Handler,
|
|
|
|