feat 跳板机接口
This commit is contained in:
33
Src/Dlhis.Middle/Controllers/CurrentController.cs
Normal file
33
Src/Dlhis.Middle/Controllers/CurrentController.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Dlhis.Middle.Entities;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Dlhis.Middle.Controllers;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class CurrentController : ControllerBase
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
|
||||
public CurrentController(IDbContext dbContext)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("gainfos")]
|
||||
public async Task<object> GetGainfosAsync()
|
||||
{
|
||||
return await _dbContext.Queryable<LocalGainfoEntity>().ToListAsync();
|
||||
}
|
||||
|
||||
[HttpGet("gainfoMeals")]
|
||||
public async Task<object> GetGainfoMealsAsync()
|
||||
{
|
||||
return await _dbContext.Queryable<LocalGainfoMealEntity>().ToListAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user