30 lines
783 B
C#
30 lines
783 B
C#
using Dlhis.Basic.Summary.Response;
|
|
using Dlhis.Basic.Summary.Services;
|
|
using Dlhis.Entity.Device.Enums;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Dlhis.Basic.Summary.Controllers;
|
|
|
|
[Authorize]
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class SummariesController : ControllerBase
|
|
{
|
|
private readonly ISummaryService _summaryService;
|
|
|
|
public SummariesController(ISummaryService summaryService)
|
|
{
|
|
_summaryService = summaryService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 首页
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("home-summary")]
|
|
public async Task<HomeSummaryResponse> GetHomeSummaryAsync(DeviceTypeEnumType type)
|
|
{
|
|
return await _summaryService.GetHomeSummaryAsync(type);
|
|
}
|
|
} |