You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.8 KiB
C#
74 lines
1.8 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.System.Dtos;
|
|
using DS.WMS.Core.System.Interface;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.WebApi.Controllers;
|
|
|
|
/// <summary>
|
|
/// 客户端公告模块
|
|
/// </summary>
|
|
public class NoticeController : ApiController
|
|
{
|
|
private readonly ISysNoticeService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public NoticeController(ISysNoticeService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取客户端公告列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetClientNoticeList")]
|
|
public DataResult<List<ClientNoticeViewModel>> GetClientNoticeList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetClientNoticeList(request);
|
|
return res;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取客户端公告信息
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetClientNoticeInfo")]
|
|
public DataResult<ClientNoticeViewModel> GetClientNoticeInfo([FromQuery] int id)
|
|
{
|
|
var res = _invokeService.GetClientNoticeInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 设置公告已读
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("ReadNotice")]
|
|
public DataResult ReadNotice([FromQuery] int id)
|
|
{
|
|
var res = _invokeService.ReadNotice(id);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取未读消息列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetNoReadList")]
|
|
public DataResult GetNoReadList()
|
|
{
|
|
var res = _invokeService.GetNoReadList();
|
|
return res;
|
|
}
|
|
} |