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