|
|
|
@ -29,13 +29,15 @@ type UserCenterClient interface {
|
|
|
|
|
//ChangeIntegral 新增用户积分
|
|
|
|
|
ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error)
|
|
|
|
|
//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(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error)
|
|
|
|
|
UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error)
|
|
|
|
|
StatPvpKill(ctx context.Context, in *StatPvPKillReq, 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(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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/GetUserIntegral", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -84,6 +86,15 @@ func (c *userCenterClient) GetUserIntegral(ctx context.Context, in *UserIdResp,
|
|
|
|
|
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) {
|
|
|
|
|
out := new(UserSendGiftResp)
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *userCenterClient) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
|
|
|
out := new(Empty)
|
|
|
|
|
func (c *userCenterClient) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error) {
|
|
|
|
|
out := new(StatPvPReportResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/pb.userCenter/statPvpReport", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
@ -149,13 +160,15 @@ type UserCenterServer interface {
|
|
|
|
|
//ChangeIntegral 新增用户积分
|
|
|
|
|
ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error)
|
|
|
|
|
//GetUserIntegral 获取用户积分
|
|
|
|
|
GetUserIntegral(context.Context, *UserIdResp) (*UserIntegralResp, error)
|
|
|
|
|
GetUserIntegral(context.Context, *UserIdReq) (*UserIntegralResp, error)
|
|
|
|
|
//UserCheckIn 用户签到|打卡
|
|
|
|
|
UserCheckIn(context.Context, *UserIdReq) (*UserCheckInResp, error)
|
|
|
|
|
// UserSendGift 用户赠送礼物
|
|
|
|
|
UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error)
|
|
|
|
|
UserBuyNobility(context.Context, *UserBuyNobilityReq) (*UserBuyNobilityResp, error)
|
|
|
|
|
StatPvpKill(context.Context, *StatPvPKillReq) (*Empty, error)
|
|
|
|
|
StatPvpFirstBlood(context.Context, *StatPvPFirstBloodReq) (*Empty, error)
|
|
|
|
|
StatPvpReport(context.Context, *StatPvPReportReq) (*Empty, error)
|
|
|
|
|
StatPvpReport(context.Context, *StatPvPReportReq) (*StatPvPReportResp, error)
|
|
|
|
|
// rankPvp pvp排行
|
|
|
|
|
RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error)
|
|
|
|
|
mustEmbedUnimplementedUserCenterServer()
|
|
|
|
@ -174,9 +187,12 @@ func (UnimplementedUserCenterServer) GetUserIdByPUid(context.Context, *PlatformU
|
|
|
|
|
func (UnimplementedUserCenterServer) ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error) {
|
|
|
|
|
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")
|
|
|
|
|
}
|
|
|
|
|
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) {
|
|
|
|
|
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) {
|
|
|
|
|
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")
|
|
|
|
|
}
|
|
|
|
|
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) {
|
|
|
|
|
in := new(UserIdResp)
|
|
|
|
|
in := new(UserIdReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
@ -275,7 +291,25 @@ func _UserCenter_GetUserIntegral_Handler(srv interface{}, ctx context.Context, d
|
|
|
|
|
FullMethod: "/pb.userCenter/GetUserIntegral",
|
|
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
@ -411,6 +445,10 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{
|
|
|
|
|
MethodName: "GetUserIntegral",
|
|
|
|
|
Handler: _UserCenter_GetUserIntegral_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "UserCheckIn",
|
|
|
|
|
Handler: _UserCenter_UserCheckIn_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "userSendGift",
|
|
|
|
|
Handler: _UserCenter_UserSendGift_Handler,
|
|
|
|
|