diff --git a/Src/Dlhis.Common/SysData/Controller/SysDataController.cs b/Src/Dlhis.Common/SysData/Controller/SysDataController.cs index a7a7f895..7e5a31e2 100644 --- a/Src/Dlhis.Common/SysData/Controller/SysDataController.cs +++ b/Src/Dlhis.Common/SysData/Controller/SysDataController.cs @@ -1,4 +1,5 @@ using Dlhis.Common.SysData.Services; +using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -16,6 +17,7 @@ public class SysDataController : ControllerBase _sysDataService = sysDataService; } + [IgnoreTenant] [HttpGet("download")] public async Task> DownloadAsync(string factory, string tableName) { diff --git a/Src/Dlhis.Common/SysData/Services/Implements/SysDataService.cs b/Src/Dlhis.Common/SysData/Services/Implements/SysDataService.cs index acac4114..4e2de1f3 100644 --- a/Src/Dlhis.Common/SysData/Services/Implements/SysDataService.cs +++ b/Src/Dlhis.Common/SysData/Services/Implements/SysDataService.cs @@ -21,7 +21,7 @@ public class SysDataService : ISysDataService var type = App.ActiveTypes .Where(x => x.IsDefined(typeof(SugarTable), false)) .Where(x => !x.IsDefined(typeof(SkipScanAttribute), false)) - .FirstOrDefault(x => x.GetCustomAttribute()!.TableName == tableName); + .First(x => x.GetCustomAttribute()!.TableName == tableName); var table = type.GetCustomAttribute()!.TableName; var sql = $"select * from {table}";