feat 获取服务时间

This commit is contained in:
2024-03-17 21:26:16 +08:00
parent ba0fe3e67f
commit a59404711c
2 changed files with 34 additions and 0 deletions

View File

@@ -24,4 +24,10 @@
<ProjectReference Include="..\Dlhis.Entity\Dlhis.Entity.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Server\Request\" />
<Folder Include="Server\Response\" />
<Folder Include="Server\Services\Implements\" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.Sys.Server.Controllers;
/// <summary>
/// 服务器信息
/// </summary>
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class ServerController : ControllerBase
{
public ServerController()
{
}
/// <summary>
/// 当前时间
/// </summary>
/// <returns></returns>
[HttpGet("datetime")]
public DateTime GetServerDateTime()
{
return DateTime.Now;
}
}