feat 获取服务时间
This commit is contained in:
@@ -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>
|
||||
|
||||
28
Src/Dlhis.Sys/Server/Controllers/ServerController.cs
Normal file
28
Src/Dlhis.Sys/Server/Controllers/ServerController.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user