//
namespace SafeCampus.Web.Core;
///
/// 站内信控制器
///
[ApiDescriptionSettings(Tag = "站内信")]
[Route("sys/dev/[controller]")]
public class MessageController : BaseController
{
private readonly IMessageService _messageService;
public MessageController(IMessageService messageService)
{
_messageService = messageService;
}
///
/// 分页查询
///
///
///
[HttpGet("page")]
public async Task Page([FromQuery] MessagePageInput input)
{
return await _messageService.Page(input);
}
///
/// 发送站内信
///
///
///
[HttpPost("send")]
[DisplayName("发送站内信")]
public async Task Send([FromBody] MessageSendInput input)
{
await _messageService.Send(input);
}
///
/// 消息详情
///
///
///
[HttpGet("detail")]
public async Task Detail([FromQuery] BaseIdInput input)
{
return await _messageService.Detail(input);
}
///
/// 删除站内信
///
///
///
[HttpPost("delete")]
[DisplayName("删除站内信")]
public async Task Delete([FromBody] BaseIdListInput input)
{
await _messageService.Delete(input);
}
}