平安校园
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.

MessageController.cs 1.5 KiB

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