feat 提供数据下载功能

This commit is contained in:
2024-06-26 11:09:11 +08:00
parent d1b7dfae1e
commit fb797908e0
3 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using Dlhis.Common.SysData.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.Common.SysData.Controller;
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class SysDataController : ControllerBase
{
private readonly ISysDataService _sysDataService;
public SysDataController(ISysDataService sysDataService)
{
_sysDataService = sysDataService;
}
[HttpGet("download")]
public async Task<List<object>> DownloadAsync(string factory, string tableName)
{
return await _sysDataService.DownloadAsync(factory, tableName);
}
}