实现获取用户角色列表接口
This commit is contained in:
@ -299,3 +299,17 @@ func (s *sUser) DelUser(ctx context.Context, in *model.DelUserIn) (out *model.De
|
||||
|
||||
return &model.DeleteOut{Success: true}, nil
|
||||
}
|
||||
|
||||
func (s *sUser) GetUserGameRole(ctx context.Context, in *model.GetUserGameRoleIn) (out *model.GetUserGameRoleOut, err error) {
|
||||
activity, err := gamelife.GetGamelifeClient(ctx).RequestActivity(ctx, &model.QQNetbarActivityIn{ServiceName: consts.QueryUserRoleList, PopenId: in.PopenId, BindType: in.BindType, UserRoleParam: model.UserRoleParam{Gid: in.GameId, Area: in.Area}})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result, ok := activity.(*[]model.UserRole)
|
||||
if !ok {
|
||||
return nil, ecode.Fail.Sub("获取用户游戏角色失败")
|
||||
}
|
||||
return &model.GetUserGameRoleOut{
|
||||
RoleList: *result,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user