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.
75 lines
1.8 KiB
C#
75 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 AnnouncementController : ApiController
|
|
{
|
|
private readonly IAnnouncementService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public AnnouncementController(IAnnouncementService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetAnnouncementList")]
|
|
public DataResult<List<AnnouncementViewModel>> GetListByPage([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取公告信息
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetAnnouncementInfo")]
|
|
public DataResult<AnnouncementViewModel> GetAnnouncementInfo([FromQuery] int id)
|
|
{
|
|
var res = _invokeService.GetAnnouncementInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 设置已读
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("ReadAnnouncement")]
|
|
public DataResult ReadAnnouncement([FromQuery] int id)
|
|
{
|
|
var res = _invokeService.ReadAnnouncement(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 获取未读消息列表
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetNoReadList")]
|
|
public DataResult GetNoReadList([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetNoReadList(id);
|
|
return res;
|
|
}
|
|
|
|
} |