fix ignoreTenantId

This commit is contained in:
2024-06-26 12:00:08 +08:00
parent fb797908e0
commit 67fa5e5994
2 changed files with 3 additions and 1 deletions

View File

@@ -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<List<object>> DownloadAsync(string factory, string tableName)
{

View File

@@ -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<SugarTable>()!.TableName == tableName);
.First(x => x.GetCustomAttribute<SugarTable>()!.TableName == tableName);
var table = type.GetCustomAttribute<SugarTable>()!.TableName;
var sql = $"select * from {table}";