fix ignoreTenantId
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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}";
|
||||
|
||||
Reference in New Issue
Block a user