Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5e4f0057e4 | ||
![]() |
2960c13ef1 | ||
![]() |
f11b7f7ab4 | ||
![]() |
9bb9cd7419 | ||
![]() |
ba008ef8ba | ||
![]() |
28b533decf | ||
![]() |
9ee638c2f1 | ||
![]() |
d90fdbaf35 | ||
![]() |
b55e3db736 | ||
![]() |
dbee8496cb | ||
![]() |
044e78bea9 | ||
![]() |
fe79128d90 | ||
![]() |
34120da008 | ||
![]() |
4c62bb0b21 | ||
![]() |
46b16279c7 | ||
![]() |
0779efc5dd | ||
![]() |
8acdb780e8 | ||
![]() |
2e310b919e | ||
![]() |
4155c07269 | ||
![]() |
32fa833736 | ||
![]() |
2258f08555 | ||
![]() |
d90b32f165 | ||
![]() |
1492377322 | ||
![]() |
32eefbf545 | ||
![]() |
a825ca5f6f | ||
![]() |
e270b0c4f6 | ||
![]() |
6ae44ccf58 | ||
![]() |
1aa0df6339 | ||
![]() |
62c3693dbe | ||
![]() |
e4e503c97b | ||
![]() |
5ec1ee7627 | ||
![]() |
79789388fc | ||
![]() |
2c4194ee18 | ||
![]() |
1b2be585af | ||
![]() |
83736647e7 | ||
![]() |
b06405717d | ||
![]() |
298a1f2ed4 | ||
![]() |
74a47a1983 | ||
![]() |
a48a42abe4 |
@@ -20,7 +20,6 @@ using System.Collections.Concurrent;
|
||||
using ThingsGateway.Extension;
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.NewLife.Json.Extension;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -33,22 +33,22 @@ public static class CacheConst
|
||||
/// <summary>
|
||||
/// 资源表缓存Key
|
||||
/// </summary>
|
||||
public const string Cache_SysResource = $"{CacheConst.Cache_Prefix_Admin}SysResource:";
|
||||
public const string Cache_SysResource = $"{CacheConst.Cache_Prefix_Admin}SysResource:List";
|
||||
|
||||
/// <summary>
|
||||
/// 角色表缓存Key
|
||||
/// </summary>
|
||||
public const string Cache_SysRole = $"{CacheConst.Cache_Prefix_Admin}SysRole:";
|
||||
public const string Cache_SysRole = $"{CacheConst.Cache_Prefix_Admin}SysRole:List";
|
||||
|
||||
/// <summary>
|
||||
/// 用户表缓存Key
|
||||
/// </summary>
|
||||
public const string Cache_SysUser = $"{CacheConst.Cache_Prefix_Admin}SysUser:";
|
||||
public const string Cache_SysUser = $"{CacheConst.Cache_Prefix_Admin}SysUser:Hash";
|
||||
|
||||
/// <summary>
|
||||
/// 用户账号关系缓存Key
|
||||
/// </summary>
|
||||
public const string Cache_SysUserAccount = $"{CacheConst.Cache_Prefix_Admin}SysUserAccount:";
|
||||
public const string Cache_SysUserAccount = $"{CacheConst.Cache_Prefix_Admin}SysUserAccount:Hash";
|
||||
|
||||
/// <summary>
|
||||
/// 职位表缓存Key
|
||||
@@ -58,7 +58,7 @@ public static class CacheConst
|
||||
/// <summary>
|
||||
/// 机构表缓存Key
|
||||
/// </summary>
|
||||
public const string Cache_SysOrg = $"{CacheConst.Cache_Prefix_Admin}SysOrg:";
|
||||
public const string Cache_SysOrg = $"{CacheConst.Cache_Prefix_Admin}SysOrg:List";
|
||||
|
||||
/// <summary>
|
||||
/// 公司表缓存Key
|
||||
@@ -67,12 +67,12 @@ public static class CacheConst
|
||||
/// <summary>
|
||||
/// 公司表缓存Key
|
||||
/// </summary>
|
||||
public const string Cache_SysOrgTenant = $"{CacheConst.Cache_Prefix_Admin}OrgTenant:";
|
||||
public const string Cache_SysOrgTenant = $"{CacheConst.Cache_Prefix_Admin}OrgTenant:Hash";
|
||||
|
||||
/// <summary>
|
||||
/// Token表缓存Key
|
||||
/// </summary>
|
||||
public const string Cache_Token = $"{CacheConst.Cache_Prefix_Admin}Token:";
|
||||
public const string Cache_Token = $"{CacheConst.Cache_Prefix_Admin}Token:Hash";
|
||||
|
||||
#region 登录错误次数
|
||||
|
||||
|
@@ -8,12 +8,8 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
[SugarTable("sys_dict", TableDescription = "字典表")]
|
||||
|
@@ -8,10 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,12 +8,8 @@
|
||||
// QQ群:605534569
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,11 +8,9 @@
|
||||
// QQ群:605534569
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,16 +8,12 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,12 +8,8 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,14 +8,9 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Riok.Mapperly.Abstractions;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,10 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.List;
|
||||
using ThingsGateway.SqlSugar;
|
||||
using ThingsGateway.Common.List;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,9 +8,30 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
global using System;
|
||||
global using System.Collections.Generic;
|
||||
global using System.Threading;
|
||||
global using System.Threading.Tasks;
|
||||
using ThingsGateway.Extension;
|
||||
|
||||
global using ThingsGateway.Gateway.Application;
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[ThingsGateway.DependencyInjection.SuppressSniffer]
|
||||
public static class SchemeHelper
|
||||
{
|
||||
|
||||
public static string GetOrCreate()
|
||||
{
|
||||
var path = "Keys/SchemeKey.txt";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
var data = File.ReadAllText(path);
|
||||
return data;
|
||||
}
|
||||
else
|
||||
{
|
||||
var data = DateTime.UtcNow.ToDefaultDateTimeFormat();
|
||||
Directory.CreateDirectory("Keys");
|
||||
File.WriteAllText(path, data);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -79,7 +79,7 @@ public class RequestAuditFilter : IAsyncActionFilter, IOrderedFilter
|
||||
|
||||
logData.TimeOperationElapsedMilliseconds = timeOperation.ElapsedMilliseconds;
|
||||
|
||||
var resultHttpContext = (resultContext as FilterContext).HttpContext;
|
||||
var resultHttpContext = (resultContext as Microsoft.AspNetCore.Mvc.Filters.FilterContext).HttpContext;
|
||||
|
||||
// 获取 HttpContext 和 HttpRequest 对象
|
||||
var httpContext = context.HttpContext;
|
||||
|
@@ -8,4 +8,15 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
global using ThingsGateway.NewLife.Extension;
|
||||
global using BootstrapBlazor.Components;
|
||||
|
||||
global using Microsoft.Extensions.Localization;
|
||||
global using Microsoft.Extensions.Options;
|
||||
|
||||
global using System.Diagnostics.CodeAnalysis;
|
||||
global using System.Globalization;
|
||||
|
||||
global using ThingsGateway.Common;
|
||||
global using ThingsGateway.DB;
|
||||
global using ThingsGateway.NewLife.Extension;
|
||||
global using ThingsGateway.SqlSugar;
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.NewLife;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
@@ -9,9 +9,7 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -20,7 +18,6 @@ using ThingsGateway.NewLife;
|
||||
using ThingsGateway.NewLife.Caching;
|
||||
using ThingsGateway.NewLife.Threading;
|
||||
using ThingsGateway.Schedule;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
@@ -53,8 +50,8 @@ public class HardwareJob : IJob, IHardwareJob
|
||||
|
||||
#endregion 属性
|
||||
|
||||
private MemoryCache MemoryCache = new() { };
|
||||
private const string CacheKey = "HistoryHardwareInfo";
|
||||
private ICache MemoryCache => App.CacheService;
|
||||
private const string CacheKey = $"{CacheConst.Cache_HardwareInfo}HistoryHardwareInfo";
|
||||
/// <inheritdoc/>
|
||||
public async Task<List<HistoryHardwareInfo>> GetHistoryHardwareInfos()
|
||||
{
|
||||
@@ -81,8 +78,7 @@ public class HardwareJob : IJob, IHardwareJob
|
||||
{
|
||||
if (HardwareInfo.MachineInfo == null)
|
||||
{
|
||||
MachineInfo.Register();
|
||||
HardwareInfo.MachineInfo = MachineInfo.Current;
|
||||
HardwareInfo.MachineInfo = MachineInfo.GetCurrent();
|
||||
|
||||
string currentPath = Directory.GetCurrentDirectory();
|
||||
DriveInfo drive = new(Path.GetPathRoot(currentPath));
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -15,8 +15,6 @@ using ThingsGateway.Extension;
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.Logging;
|
||||
using ThingsGateway.NewLife.Json.Extension;
|
||||
using ThingsGateway.Razor;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Riok.Mapperly.Abstractions;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
@@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
using System.Security.Claims;
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
using System.Security.Claims;
|
||||
@@ -116,7 +115,7 @@ public class BlazorAuthenticationHandler : AppAuthorizeHandler
|
||||
{
|
||||
// 路由名称
|
||||
var routeName = routeData.PageType.CustomAttributes.FirstOrDefault(x =>
|
||||
x.AttributeType == typeof(RouteAttribute))?.ConstructorArguments?[0].Value as string;
|
||||
x.AttributeType == typeof(Microsoft.AspNetCore.Components.RouteAttribute))?.ConstructorArguments?[0].Value as string;
|
||||
if (routeName == null) return true;
|
||||
|
||||
if ((!user.PermissionCodeList.Contains(routeName.CutStart("/")) && !user.PermissionCodeList.Contains(routeName))) //如果当前路由信息不包含在角色授权路由列表中则认证失败
|
||||
|
@@ -11,11 +11,9 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
using ThingsGateway.DataValidation;
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.Razor;
|
||||
using ThingsGateway.UnifyResult;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
@@ -9,19 +9,15 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
|
||||
using ThingsGateway.Extension;
|
||||
using ThingsGateway.Common.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
using System.Security.Claims;
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,11 +8,8 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.NewLife.Json.Extension;
|
||||
using ThingsGateway.Razor;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -10,6 +10,8 @@
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
using ThingsGateway.NewLife.DictionaryExtensions;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.Extension.Generic;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,12 +8,8 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using System.Data;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
internal sealed class SysOperateLogService : BaseService<SysOperateLog>, ISysOperateLogService
|
||||
|
@@ -8,10 +8,6 @@
|
||||
// QQ群:605534569
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,11 +8,8 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.Extension.Generic;
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,10 +8,6 @@
|
||||
// QQ群:605534569
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,10 +8,7 @@
|
||||
// QQ群:605534569
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
using ThingsGateway.Extension.Generic;
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,14 +8,9 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using System.Globalization;
|
||||
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
@@ -23,7 +18,7 @@ internal sealed class SysResourceService : BaseService<SysResource>, ISysResourc
|
||||
{
|
||||
private readonly IRelationService _relationService;
|
||||
|
||||
private string CacheKey = $"{CacheConst.Cache_SysResource}-{CultureInfo.CurrentUICulture.Name}";
|
||||
private string CacheKey = $"{CacheConst.Cache_SysResource}";
|
||||
|
||||
public SysResourceService(IRelationService relationService)
|
||||
{
|
||||
@@ -32,7 +27,6 @@ internal sealed class SysResourceService : BaseService<SysResource>, ISysResourc
|
||||
|
||||
#region 增删改查
|
||||
|
||||
|
||||
[OperDesc("CopyResource")]
|
||||
public async Task CopyAsync(IEnumerable<long> ids, long moduleId)
|
||||
{
|
||||
@@ -143,12 +137,12 @@ internal sealed class SysResourceService : BaseService<SysResource>, ISysResourc
|
||||
/// <returns>全部资源列表</returns>
|
||||
public async Task<List<SysResource>> GetAllAsync()
|
||||
{
|
||||
var sysResources = App.CacheService.Get<List<SysResource>>(CacheKey);
|
||||
var sysResources = App.CacheService.Get<List<SysResource>>(CacheConst.Cache_SysResource);
|
||||
if (sysResources == null)
|
||||
{
|
||||
using var db = GetDB();
|
||||
sysResources = await db.Queryable<SysResource>().ToListAsync().ConfigureAwait(false);
|
||||
App.CacheService.Set(CacheKey, sysResources);
|
||||
App.CacheService.Set(CacheConst.Cache_SysResource, sysResources);
|
||||
}
|
||||
return sysResources;
|
||||
}
|
||||
@@ -258,7 +252,7 @@ internal sealed class SysResourceService : BaseService<SysResource>, ISysResourc
|
||||
/// </summary>
|
||||
public void RefreshCache()
|
||||
{
|
||||
App.CacheService.Remove(CacheKey);
|
||||
App.CacheService.Remove(CacheConst.Cache_SysResource);
|
||||
//删除超级管理员的缓存
|
||||
App.RootServices.GetRequiredService<ISysUserService>().DeleteUserFromCache(RoleConst.SuperAdminId);
|
||||
}
|
||||
|
@@ -8,10 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,11 +8,8 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.NewLife.Json.Extension;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
public interface ISessionService
|
||||
|
@@ -8,10 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
internal sealed class SessionService : BaseService<SysUser>, ISessionService
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,14 +8,12 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.Common.Extension;
|
||||
using ThingsGateway.Common.Extension.Generic;
|
||||
using ThingsGateway.DataEncryption;
|
||||
using ThingsGateway.Extension;
|
||||
using ThingsGateway.Extension.Generic;
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.NewLife.Json.Extension;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,16 +8,13 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using ThingsGateway.Common.Extension;
|
||||
using ThingsGateway.DataEncryption;
|
||||
using ThingsGateway.Extension;
|
||||
using ThingsGateway.Extension.Generic;
|
||||
using ThingsGateway.FriendlyException;
|
||||
using ThingsGateway.NewLife.Json.Extension;
|
||||
using ThingsGateway.Razor;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
@@ -43,7 +41,6 @@ public class Startup : AppStartup
|
||||
|
||||
services.AddSingleton<IVerificatInfoService, VerificatInfoService>();
|
||||
|
||||
services.AddScoped<IAuthRazorService, AuthRazorService>();
|
||||
services.AddSingleton<IApiPermissionService, ApiPermissionService>();
|
||||
services.AddSingleton<IFileService, FileService>();
|
||||
services.AddSingleton<IImportExportService, ImportExportService>();
|
||||
|
@@ -21,7 +21,7 @@ namespace ThingsGateway.Admin.Application
|
||||
Settings = new UserAgentSettings();
|
||||
}
|
||||
|
||||
private MemoryCache MemoryCache { get; set; } = new();
|
||||
private ICache MemoryCache => App.CacheService;
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified user agent string.
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.NewLife;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -8,8 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -9,7 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Extension.Generic;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -16,7 +16,10 @@ global using Microsoft.Extensions.Options;
|
||||
|
||||
global using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
global using ThingsGateway.Common;
|
||||
global using ThingsGateway.DB;
|
||||
global using ThingsGateway.NewLife.Extension;
|
||||
global using ThingsGateway.Razor;
|
||||
|
||||
global using ThingsGateway.SqlSugar;
|
||||
[assembly: SuppressMessage("Reliability", "CA2007", Justification = "<挂起>", Scope = "module")]
|
||||
[assembly: GlobalGenerateSetParametersAsync(true)]
|
@@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Components.Forms;
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.Extension.Generic;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -90,8 +90,8 @@
|
||||
<h6> @((100 - (availableMemory * 100.00 / memory)).ToString("F2") + " %") </h6>
|
||||
|
||||
<span> @Localizer["WorkingSet"] <i> @(HardwareJob.HardwareInfo.WorkingSet + " MB")</i></span>
|
||||
<span> @Localizer["AvailableMemory"] <i> @((availableMemory / 1024.00 / 1024 / 1024).ToString("F2") + " GB")</i></span>
|
||||
<span> @Localizer["TotalMemory"] <i> @((memory / 1024.00 / 1024 / 1024).ToString("F2") + " GB")</i></span>
|
||||
<span> @Localizer["AvailableMemory"] <i> @((availableMemory / 1024.00 / 1024).ToString("F2") + " GB")</i></span>
|
||||
<span> @Localizer["TotalMemory"] <i> @((memory / 1024.00 / 1024).ToString("F2") + " GB")</i></span>
|
||||
|
||||
</div>
|
||||
</Circle>
|
||||
|
@@ -9,8 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -9,8 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -9,8 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
using ThingsGateway.SqlSugar;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.Extension.Generic;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
@@ -8,13 +8,11 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.NewLife.Json.Extension;
|
||||
using ThingsGateway.Razor;
|
||||
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
internal sealed class AuthRazorService : IAuthRazorService
|
||||
{
|
@@ -8,9 +8,9 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Razor;
|
||||
using ThingsGateway.Admin.Application;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
|
||||
public class HybridAuthRazorService : IAuthRazorService
|
@@ -8,9 +8,9 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Razor;
|
||||
using ThingsGateway.Admin.Application;
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
namespace ThingsGateway.Admin.Razor;
|
||||
|
||||
public interface IAuthRazorService
|
||||
{
|
@@ -18,6 +18,7 @@ public class Startup : AppStartup
|
||||
public void Configure(IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IMenuService, MenuService>();
|
||||
services.AddScoped<IAuthRazorService, AuthRazorService>();
|
||||
services.AddBootstrapBlazorTableExportService();
|
||||
}
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BlazorSetParametersAsyncGenerator\BlazorSetParametersAsyncGenerator.csproj" PrivateAssets="all" OutputItemType="Analyzer" />
|
||||
<ProjectReference Include="..\ThingsGateway.Razor\ThingsGateway.Razor.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@@ -15,5 +15,5 @@
|
||||
|
||||
@using BootstrapBlazor.Components
|
||||
|
||||
|
||||
@using ThingsGateway.Common.Extension;
|
||||
@using ThingsGateway.Razor;
|
@@ -14,6 +14,7 @@
|
||||
"ThingsGateway.SqlSugar",
|
||||
"ThingsGateway.Admin.Application",
|
||||
"ThingsGateway.Admin.Razor",
|
||||
"ThingsGateway.Common",
|
||||
"ThingsGateway.DB",
|
||||
"ThingsGateway.Razor"
|
||||
]
|
||||
|
@@ -14,6 +14,7 @@
|
||||
"ThingsGateway.SqlSugar",
|
||||
"ThingsGateway.Admin.Application",
|
||||
"ThingsGateway.Admin.Razor",
|
||||
"ThingsGateway.Common",
|
||||
"ThingsGateway.DB",
|
||||
"ThingsGateway.Razor"
|
||||
]
|
||||
|
22
src/Admin/ThingsGateway.AdminServer/Configuration/Cache.json
Normal file
22
src/Admin/ThingsGateway.AdminServer/Configuration/Cache.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"Cache": {
|
||||
"CacheType": "Memory", // 可选:Memory 或 Redis
|
||||
|
||||
"MemoryCacheOptions": {
|
||||
"Expire": 3600,
|
||||
"Capacity": 100000,
|
||||
"Period": 60
|
||||
},
|
||||
|
||||
"RedisCacheOptions": {
|
||||
"InstanceName": "ThingsGateway",
|
||||
"Configuration": "server=127.0.0.1:6379;password=123456;db=3;timeout=3000",
|
||||
"Server": "127.0.0.1:6379",
|
||||
"Db": 3,
|
||||
"UserName": "",
|
||||
"Password": "123456",
|
||||
"Timeout": 3000,
|
||||
"Prefix": "ThingsGateway:"
|
||||
}
|
||||
}
|
||||
}
|
@@ -6,6 +6,7 @@
|
||||
@using ThingsGateway.Admin.Razor
|
||||
@using ThingsGateway.Extension;
|
||||
@using ThingsGateway.Razor
|
||||
@using ThingsGateway.Common.Extension;
|
||||
|
||||
<div class="login h-100">
|
||||
@* 左侧说明 *@
|
||||
|
@@ -19,6 +19,8 @@ using Microsoft.Extensions.Options;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.Admin.Razor;
|
||||
using ThingsGateway.Common;
|
||||
using ThingsGateway.DataEncryption;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
using ThingsGateway.Razor;
|
||||
|
@@ -17,9 +17,11 @@
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Microsoft.Extensions.Localization
|
||||
@using ThingsGateway.Common.Extension;
|
||||
|
||||
@using System.ComponentModel
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using ThingsGateway.DB;
|
||||
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
|
@@ -19,6 +19,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.Admin.Razor;
|
||||
using ThingsGateway.Common;
|
||||
using ThingsGateway.Razor;
|
||||
|
||||
namespace ThingsGateway.AdminServer;
|
||||
|
@@ -13,6 +13,8 @@ using Microsoft.AspNetCore.ResponseCompression;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.DB;
|
||||
using ThingsGateway.NewLife.Log;
|
||||
|
||||
namespace ThingsGateway.AdminServer;
|
||||
@@ -29,6 +31,8 @@ public class Program
|
||||
// 增加中文编码支持
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
|
||||
ClaimConst.Scheme = $"{typeof(Program).Assembly.GetName().Name}{SchemeHelper.GetOrCreate()}";
|
||||
|
||||
#region 控制台输出Logo
|
||||
|
||||
Console.Write(Environment.NewLine);
|
||||
|
@@ -40,6 +40,7 @@ public class SingleFilePublish : ISingleFilePublish
|
||||
"ThingsGateway.NewLife.X",
|
||||
"ThingsGateway.Razor",
|
||||
"ThingsGateway.Admin.Razor" ,
|
||||
"ThingsGateway.Common",
|
||||
"ThingsGateway.DB",
|
||||
"ThingsGateway.Admin.Application",
|
||||
"ThingsGateway.SqlSugar",
|
||||
|
@@ -26,7 +26,7 @@ using System.Text.Unicode;
|
||||
|
||||
using ThingsGateway.Admin.Application;
|
||||
using ThingsGateway.Admin.Razor;
|
||||
using ThingsGateway.NewLife.Caching;
|
||||
using ThingsGateway.DB;
|
||||
using ThingsGateway.VirtualFileServer;
|
||||
|
||||
namespace ThingsGateway.AdminServer;
|
||||
@@ -59,8 +59,6 @@ public class Startup : AppStartup
|
||||
options.AddPersistence<JobPersistence>();
|
||||
});
|
||||
|
||||
// 缓存
|
||||
services.AddSingleton<ICache, MemoryCache>();
|
||||
|
||||
// 允许跨域
|
||||
services.AddCorsAccessor();
|
||||
@@ -110,7 +108,7 @@ public class Startup : AppStartup
|
||||
.AddHubOptions(options =>
|
||||
{
|
||||
//单个传入集线器消息的最大大小。默认 32 KB
|
||||
options.MaximumReceiveMessageSize = 1024 * 1024;
|
||||
options.MaximumReceiveMessageSize = 32 * 1024 * 1024;
|
||||
//可为客户端上载流缓冲的最大项数。 如果达到此限制,则会阻止处理调用,直到服务器处理流项。
|
||||
options.StreamBufferCapacity = 30;
|
||||
options.ClientTimeoutInterval = TimeSpan.FromMinutes(2);
|
||||
@@ -129,7 +127,7 @@ public class Startup : AppStartup
|
||||
}).AddHubOptions(options =>
|
||||
{
|
||||
//单个传入集线器消息的最大大小。默认 32 KB
|
||||
options.MaximumReceiveMessageSize = 1024 * 1024;
|
||||
options.MaximumReceiveMessageSize = 32 * 1024 * 1024;
|
||||
//可为客户端上载流缓冲的最大项数。 如果达到此限制,则会阻止处理调用,直到服务器处理流项。
|
||||
options.StreamBufferCapacity = 30;
|
||||
options.ClientTimeoutInterval = TimeSpan.FromMinutes(2);
|
||||
@@ -208,7 +206,7 @@ public class Startup : AppStartup
|
||||
var certificate = new X509Certificate2("ThingsGateway.pfx", "ThingsGateway", X509KeyStorageFlags.EphemeralKeySet);
|
||||
#endif
|
||||
services.AddDataProtection()
|
||||
.PersistKeysToFileSystem(new DirectoryInfo("keys"))
|
||||
.PersistKeysToFileSystem(new DirectoryInfo("Keys"))
|
||||
.ProtectKeysWithCertificate(certificate)
|
||||
.UseCryptographicAlgorithms(new AuthenticatedEncryptorConfiguration
|
||||
{
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<TargetFrameworks>net8.0;net9.0;</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Admin.targets" Condition=" '$(Configuration)' != 'Debug' " />
|
||||
<!--<Import Project="Admin.targets" Condition=" '$(Configuration)' != 'Debug' " />-->
|
||||
<PropertyGroup>
|
||||
<OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
|
||||
<SatelliteResourceLanguages>zh-Hans;en-US</SatelliteResourceLanguages>
|
||||
@@ -26,7 +26,7 @@
|
||||
<!--<PlatformTarget>x86</PlatformTarget>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ThingsGateway.Admin.Razor\ThingsGateway.Admin.Razor.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <summary>
|
||||
/// 忽略Excel导入导出
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway.Admin.Application;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <summary>
|
||||
/// 种子数据忽略新增
|
@@ -10,13 +10,12 @@
|
||||
|
||||
using System.Collections;
|
||||
|
||||
namespace ThingsGateway.List;
|
||||
namespace ThingsGateway.Common.List;
|
||||
|
||||
/// <summary>
|
||||
/// 线程安全的List,其基本操作和List一致。
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
[ThingsGateway.DependencyInjection.SuppressSniffer]
|
||||
public class ConcurrentList<T> : IList<T>, IReadOnlyList<T>
|
||||
{
|
||||
private readonly List<T> m_list;
|
@@ -12,7 +12,7 @@
|
||||
|
||||
//using System.Text;
|
||||
|
||||
//namespace ThingsGateway.Razor;
|
||||
//namespace ThingsGateway.Common;
|
||||
|
||||
///// <summary>
|
||||
///// <see cref="Encoding"/> Master规则
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway.Razor;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
public interface IDriverUIBase
|
||||
{
|
@@ -8,9 +8,9 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.List;
|
||||
using ThingsGateway.Common.List;
|
||||
|
||||
namespace ThingsGateway;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <summary>
|
||||
/// 文件导入通用输出
|
||||
@@ -44,3 +44,14 @@ public class ImportPreviewOutput<T> : ImportPreviewOutputBase where T : class
|
||||
/// </summary>
|
||||
public Dictionary<string, T> Data { get; set; } = new();
|
||||
}
|
||||
/// <summary>
|
||||
/// 导入预览
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class ImportPreviewListOutput<T> : ImportPreviewOutputBase where T : class
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据
|
||||
/// </summary>
|
||||
public List<T> Data { get; set; } = new();
|
||||
}
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway.Razor;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
public class ModelValueValidateForm
|
||||
{
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
@@ -16,7 +16,6 @@ using System.Text;
|
||||
/// <summary>
|
||||
/// 随机数
|
||||
/// </summary>
|
||||
[ThingsGateway.DependencyInjection.SuppressSniffer]
|
||||
public static class RandomHelper
|
||||
{
|
||||
/// <summary>
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <summary>
|
||||
/// 全局分页查询输入参数
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <summary>
|
||||
/// 全局分页查询输入参数
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <summary>
|
||||
/// 主键id基类
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <summary>
|
||||
/// SqlSugar 分页泛型集合
|
@@ -8,7 +8,7 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ThingsGateway.Razor;
|
||||
namespace ThingsGateway.Common;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[ThingsGateway.DependencyInjection.SuppressSniffer]
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user