//
namespace SafeCampus.Web.Core;
///
/// 会话管理控制器
///
[ApiDescriptionSettings(Tag = "会话管理")]
[Route("sys/auth/[controller]")]
[SuperAdmin]
public class SessionController : BaseController
{
private readonly ISessionService _sessionService;
public SessionController(ISessionService sessionService)
{
_sessionService = sessionService;
}
///
/// B端会话分页
///
///
///
[HttpGet("b/page")]
public async Task PageB([FromQuery] SessionPageInput input)
{
return await _sessionService.PageB(input);
}
///
/// C端会话分页
///
///
///
[HttpGet("c/page")]
public async Task PageC([FromQuery] SessionPageInput input)
{
return await _sessionService.PageC(input);
}
///
/// 会话统计
///
///
[HttpGet("analysis")]
public dynamic Analysis()
{
return _sessionService.Analysis();
}
///
/// 强退B端会话
///
///
[HttpPost("b/exitSession")]
[DisplayName("强退B端会话")]
public async Task ExitSessionForB([FromBody] BaseIdInput input)
{
await _sessionService.ExitSession(input);
}
///
/// 强退C端会话
///
///
[HttpPost("c/exitSession")]
[DisplayName("强退C端会话")]
public async Task ExitSessionForC([FromBody] BaseIdInput input)
{
await _sessionService.ExitSession(input);
}
///
/// 强退B端Token
///
///
[HttpPost("b/ExitToken")]
[DisplayName("强退B端Token")]
public async Task ExitTokenForB([FromBody] ExitTokenInput input)
{
await _sessionService.ExitToken(input);
}
///
/// 强退C端Token
///
///
[HttpPost("c/ExitToken")]
[DisplayName("强退C端Token")]
public async Task ExitTokenForC([FromBody] ExitTokenInput input)
{
await _sessionService.ExitToken(input);
}
}