namespace CloudGaming.Api.Admin.Controllers.Systems; /// /// 系统账号管理 /// [ControllerDescriptor(MenuId = "15", DisplayName = "系统账号")] public class SysUserController(IServiceProvider serviceProvider) : AdminControllerBase(serviceProvider) { /// /// 获取用户信息 /// /// [ActionDescriptor(DisplayName = "获取当前用户信息")] [ApiResourceCacheFilter(20)] [HttpGet(Name = "info")] public async Task GetUserInfoAsync() { var accountContext = await Service.GetUserInfoAsync(); if (accountContext == null) { throw MessageBox.CreateMessage(R.ResultMessage(HttpStatusCode.Unauthorized, "未授权,请先授权访问!")); } return accountContext; } }