平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

73 lines
1.5 KiB

  1. //
  2. namespace SafeCampus.Web.Core;
  3. /// <summary>
  4. /// 站内信控制器
  5. /// </summary>
  6. [ApiDescriptionSettings(Tag = "站内信")]
  7. [Route("sys/dev/[controller]")]
  8. public class MessageController : BaseController
  9. {
  10. private readonly IMessageService _messageService;
  11. public MessageController(IMessageService messageService)
  12. {
  13. _messageService = messageService;
  14. }
  15. /// <summary>
  16. /// 分页查询
  17. /// </summary>
  18. /// <param name="input"></param>
  19. /// <returns></returns>
  20. [HttpGet("page")]
  21. public async Task<dynamic> Page([FromQuery] MessagePageInput input)
  22. {
  23. return await _messageService.Page(input);
  24. }
  25. /// <summary>
  26. /// 发送站内信
  27. /// </summary>
  28. /// <param name="input"></param>
  29. /// <returns></returns>
  30. [HttpPost("send")]
  31. [DisplayName("发送站内信")]
  32. public async Task Send([FromBody] MessageSendInput input)
  33. {
  34. await _messageService.Send(input);
  35. }
  36. /// <summary>
  37. /// 消息详情
  38. /// </summary>
  39. /// <param name="input"></param>
  40. /// <returns></returns>
  41. [HttpGet("detail")]
  42. public async Task<dynamic> Detail([FromQuery] BaseIdInput input)
  43. {
  44. return await _messageService.Detail(input);
  45. }
  46. /// <summary>
  47. /// 删除站内信
  48. /// </summary>
  49. /// <param name="input"></param>
  50. /// <returns></returns>
  51. [HttpPost("delete")]
  52. [DisplayName("删除站内信")]
  53. public async Task Delete([FromBody] BaseIdListInput input)
  54. {
  55. await _messageService.Delete(input);
  56. }
  57. }