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.
67 lines
1.9 KiB
67 lines
1.9 KiB
2 years ago
|
using Microsoft.AspNetCore.Authorization;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
using Znyc.CloudCar.IServices.Message;
|
||
|
using Znyc.CloudCar.Model.ViewModels.ReportsCallBack;
|
||
|
|
||
|
namespace Znyc.CloudCar.Controller
|
||
|
{
|
||
|
public class MessageController : ControllerBase
|
||
|
{
|
||
|
private readonly IMessageService _messageService;
|
||
|
|
||
|
public MessageController(IMessageService messageService)
|
||
|
{
|
||
|
_messageService = messageService;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 未读提示
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
[Authorize]
|
||
|
[Route("api/v1/message/unread")]
|
||
|
public async Task<ResponseOutput> UnreadMessage()
|
||
|
{
|
||
|
return await _messageService.UnreadMessage();
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询消息通知列表
|
||
|
/// </summary>
|
||
|
/// <param name="currentPage"></param>
|
||
|
/// <param name="pageSize"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
[Authorize]
|
||
|
[Route("api/v1/message/search")]
|
||
|
public async Task<ResponseOutput> PageAsync(int currentPage, int pageSize)
|
||
|
{
|
||
|
return await _messageService.PageAsync(currentPage, pageSize);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 已读消息记录
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
[HttpPut]
|
||
|
[Authorize]
|
||
|
[Route("api/v1/message")]
|
||
|
public async Task<ResponseOutput> UpdateAsync()
|
||
|
{
|
||
|
return await _messageService.UpdateAsync();
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取新用户滚动播放列表
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
[Route("api/v1/register/newusers")]
|
||
|
public async Task<ResponseOutput> GetRegistUserListAsync()
|
||
|
{
|
||
|
return await _messageService.GetRegistUserListAsync();
|
||
|
}
|
||
|
}
|
||
|
}
|