// namespace SafeCampus.Web.Core; /// /// 系统首页控制器 /// [ApiDescriptionSettings(Tag = "系统首页")] [Route("home/index")] [RolePermission] public class IndexController : BaseController { private readonly IVisitLogService _visitLogService; private readonly IOperateLogService _operateLogService; private readonly IIndexService _indexService; public IndexController(IVisitLogService visitLogService, IOperateLogService operateLogService, IIndexService indexService) { _visitLogService = visitLogService; _operateLogService = operateLogService; _indexService = indexService; } /// /// 获取当前用户访问日志列表 /// /// [HttpGet("visLog/list")] [DisplayName("访问日志")] public async Task VisLogList() { return await _visitLogService.Page(new VisitLogPageInput { Account = UserManager.UserAccount }); } /// /// 获取当前用户操作日志列表 /// /// [HttpGet("opLog/list")] [DisplayName("操作日志")] public async Task OpLogList() { return await _operateLogService.Page(new OperateLogPageInput { Account = UserManager.UserAccount }); } /// /// 获取当前用户站内信列表 /// /// [HttpGet("message/list")] [DisplayName("站内信列表")] public async Task MessageList() { return new string[] { }; } /// /// 获取当前用户日程列表 /// /// [HttpGet("schedule/list")] [DisplayName("日程列表")] public async Task ScheduleList([FromQuery] ScheduleListInput input) { return await _indexService.ScheduleList(input); } /// /// 添加日程 /// /// /// [HttpPost("schedule/add")] [DisplayName("添加日程")] public async Task AddSchedule([FromBody] ScheduleAddInput input) { await _indexService.AddSchedule(input); } /// /// 删除日程 /// /// /// [HttpPost("schedule/deleteSchedule")] [DisplayName("删除日程")] public async Task DeleteSchedule([FromBody] BaseIdListInput input) { await _indexService.DeleteSchedule(input); } }