隐藏平台warn,放开自有模块warn
This commit is contained in:
@@ -59,6 +59,7 @@ public class JwtHandler : AppAuthorizeHandler
|
||||
return true;
|
||||
|
||||
// 路由名称
|
||||
if (httpContext.Request.Path.Value == null) return false;
|
||||
var routeName = httpContext.Request.Path.Value[1..].Replace("/", ":");
|
||||
if (httpContext.Request.Path.StartsWithSegments("/api"))
|
||||
routeName = httpContext.Request.Path.Value[5..].Replace("/", ":");
|
||||
@@ -76,6 +77,7 @@ public class JwtHandler : AppAuthorizeHandler
|
||||
|
||||
// 检查授权
|
||||
//return permissionList.Contains(routeName);
|
||||
await Task.CompletedTask;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class Startup : AppStartup
|
||||
app.UseInject(string.Empty);
|
||||
|
||||
//app.MapWebSocketManager("/api/message/websocket", serviceProvider.GetService<IMHandler>());
|
||||
app.MapWebSocketManager("/websocket", serviceProvider.GetService<IMHandler>());
|
||||
app.MapWebSocketManager("/websocket", serviceProvider.GetRequiredService<IMHandler>());
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8618;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8625;CS1572;CS1573;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<NoWarn>$(NoWarn);CS1591;CA1307;CS8625;CS8600;CS8601;CS8604;CS8618;</NoWarn>
|
||||
<NoWarn>$(NoWarn);CS1591;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
|
||||
@@ -112,7 +112,7 @@ public static class EnumExtensions
|
||||
{
|
||||
if (field.FieldType.IsEnum)
|
||||
{
|
||||
strValue = ((int)enumType.InvokeMember(field.Name, BindingFlags.GetField, null, null, null)).ToString();
|
||||
strValue = ((int?)enumType.InvokeMember(field.Name, BindingFlags.GetField, null, null, null)).ToString();
|
||||
object[] arr = field.GetCustomAttributes(typeDescription, true);
|
||||
if (arr.Length > 0)
|
||||
{
|
||||
|
||||
@@ -253,7 +253,9 @@ public class ElemeAuthRequest : DefaultAuthRequest
|
||||
{
|
||||
//就是比string往后一直加要好的优化容器
|
||||
StringBuilder sb = new StringBuilder();
|
||||
#pragma warning disable SYSLIB0021 //MD5CryptoServiceProvider已过时
|
||||
using (MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider())
|
||||
#pragma warning disable SYSLIB0021 //MD5CryptoServiceProvider已过时
|
||||
{
|
||||
//将输入字符串转换为字节数组并计算哈希。
|
||||
byte[] data = md5.ComputeHash(Encoding.UTF8.GetBytes(willMd5Str));
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8625;CS1572;CS1573;CS0168;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Text;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Utils;
|
||||
|
||||
#pragma warning disable SYSLIB0014 //WebRequest.Create已过时
|
||||
public class HttpUtils
|
||||
{
|
||||
/// <summary>
|
||||
@@ -270,3 +271,4 @@ public class HttpUtils
|
||||
}
|
||||
|
||||
}
|
||||
#pragma warning restore SYSLIB0014 //WebRequest.Create已过时
|
||||
|
||||
@@ -52,7 +52,7 @@ public class TwitterBase
|
||||
|
||||
#region IComparer<QueryParameter> Members
|
||||
|
||||
public int Compare(QueryParameter x, QueryParameter y)
|
||||
public int Compare(QueryParameter? x, QueryParameter? y)
|
||||
{
|
||||
if (x.Name == y.Name)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS1572;CS1573;CS0168;CS1998;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -608,7 +608,7 @@ public static partial class Extensions
|
||||
/// 是否为空.
|
||||
/// </summary>
|
||||
/// <param name="value">值.</param>
|
||||
public static bool IsEmpty(this string value)
|
||||
public static bool IsEmpty(this string? value)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(value);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public static class CodeGenExportDataHelper
|
||||
|
||||
var len = rowChildDatas.Select(x => x.Value.Count()).OrderByDescending(x => x).FirstOrDefault();
|
||||
|
||||
if (len != null && len > 0)
|
||||
if (len > 0)
|
||||
{
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using JNPF.Common.Helper;
|
||||
using JNPF.Common.Models.NPOI;
|
||||
using JNPF.DependencyInjection;
|
||||
using NPOI.HPSF;
|
||||
@@ -8,10 +9,13 @@ using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using Spire.Doc;
|
||||
using static Microsoft.AspNetCore.Razor.Language.TagHelperMetadata;
|
||||
|
||||
namespace JNPF.Common.Security;
|
||||
|
||||
#pragma warning disable CS8602, CS0618, CA2200
|
||||
#pragma warning disable CS0618, CA2200 //再次引发捕获到的异常会更改堆栈信息
|
||||
|
||||
/// <summary>
|
||||
/// Excel导出操作类
|
||||
/// 版 本:V3.2.0
|
||||
@@ -1170,4 +1174,4 @@ public class ExcelExportHelper<T>
|
||||
|
||||
#endregion
|
||||
}
|
||||
#pragma warning restore CS8602, CS0618, CA2200
|
||||
#pragma warning restore CS0618, CA2200 //再次引发捕获到的异常会更改堆栈信息
|
||||
|
||||
@@ -494,7 +494,9 @@ public class FileHelper
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
#pragma warning disable CA2200 //再次引发捕获到的异常会更改堆栈信息
|
||||
throw ex;
|
||||
#pragma warning disable CA2200 //再次引发捕获到的异常会更改堆栈信息
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8618;CS8619;CS8625;CS1572;CS1573;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
1
common/Tnb.Thirdparty/Tnb.Thirdparty.csproj
vendored
1
common/Tnb.Thirdparty/Tnb.Thirdparty.csproj
vendored
@@ -7,6 +7,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8625;CS1572;CS1573;CS0168;CS0618;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS1572;CS1573;CS1998;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8618;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -44,12 +44,14 @@ public class OrderService : IDynamicApiController, ITransient
|
||||
ISqlSugarRepository<OrderEntity> repository,
|
||||
IUserManager userManager,
|
||||
IUsersService usersService,
|
||||
ICacheManager cacheManager)
|
||||
ICacheManager cacheManager,
|
||||
IFileManager fileManager)
|
||||
{
|
||||
_repository = repository;
|
||||
_userManager = userManager;
|
||||
_usersService = usersService;
|
||||
_cacheManager = cacheManager;
|
||||
_fileManager = fileManager;
|
||||
}
|
||||
|
||||
#region GET
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8625;CS1572;CS1573;CS0168;CS4014;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8618;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8625;CS1572;CS1573;CS0168;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8625;CS1572;CS1573;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -44,11 +44,11 @@ public class AuthorizeEntity : CEntityBase
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public override bool Equals(object obj)
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is AuthorizeEntity)
|
||||
if (obj is AuthorizeEntity authorizeEntity)
|
||||
{
|
||||
AuthorizeEntity authorizeEntity = obj as AuthorizeEntity;
|
||||
//AuthorizeEntity authorizeEntity = obj as AuthorizeEntity;
|
||||
return ItemType == authorizeEntity.ItemType && ItemId == authorizeEntity.ItemId && ObjectId == authorizeEntity.ObjectId && ObjectType == authorizeEntity.ObjectType;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8618;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8625;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -143,7 +143,7 @@ public class ModuleDataAuthorizeSchemeService : IModuleDataAuthorizeSchemeServic
|
||||
/// <param name="moduleId">功能主键.</param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task<List<ModuleDataAuthorizeSchemeEntity>> GetList(string moduleId)
|
||||
public async Task<List<ModuleDataAuthorizeSchemeEntity>> GetList(string? moduleId)
|
||||
{
|
||||
return await _repository.AsQueryable().Where(x => x.DeleteMark == null && x.ModuleId == moduleId).OrderBy(a => a.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc).OrderBy(a => a.LastModifyTime, OrderByType.Desc).ToListAsync();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8619;CS8625;CS8629;CS1572;CS1573;CS0168;CS4014;CS1998;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn)CS8604;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8625;CS1572;CS1573;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8625;CS8629;CS1572;CS1573;CS0168;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -8,10 +8,11 @@ namespace JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
/// </summary>
|
||||
public class VisualDevModelListQueryInput : PageInputBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 菜单ID.
|
||||
/// </summary>
|
||||
public string menuId { get; set; }
|
||||
//modified by PhilPan
|
||||
///// <summary>
|
||||
///// 菜单ID.
|
||||
///// </summary>
|
||||
//public string menuId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 选择导出数据key.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8618;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -57,10 +57,10 @@ public class RunService : IRunService, ITransient
|
||||
/// </summary>
|
||||
private readonly IBillRullService _billRuleService;
|
||||
|
||||
/// <summary>
|
||||
/// 缓存管理.
|
||||
/// </summary>
|
||||
private readonly ICacheManager _cacheManager;
|
||||
///// <summary>
|
||||
///// 缓存管理.
|
||||
///// </summary>
|
||||
//private readonly ICacheManager _cacheManager;
|
||||
|
||||
/// <summary>
|
||||
/// 用户管理.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8625;CS8629;CS1572;CS1573;CS0168;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -872,7 +872,7 @@ namespace JNPF.VisualDev
|
||||
|
||||
var len = rowChildDatas.Select(x => x.Value.Count()).OrderByDescending(x => x).FirstOrDefault();
|
||||
|
||||
if (len != null && len > 0)
|
||||
if (len > 0)
|
||||
{
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
|
||||
@@ -1281,7 +1281,7 @@ public class VisualDevService : IVisualDevService, IDynamicApiController, ITrans
|
||||
foreach (DbTableAndFieldModel? item in addTableList)
|
||||
{
|
||||
bool res = await _changeDataBase.Create(link, item, item.FieldList);
|
||||
if (!res) throw null;
|
||||
if (!res) Oops.Oh(ErrorCode.COM1008); // throw null;
|
||||
}
|
||||
|
||||
if (await _visualDevRepository.IsAnyAsync(x => x.Id.Equals(vEntity.Id)))
|
||||
|
||||
@@ -409,7 +409,7 @@ public class VisualdevModelAppService : IDynamicApiController, ITransient
|
||||
|
||||
var len = rowChildDatas.Select(x => x.Value.Count()).OrderByDescending(x => x).FirstOrDefault();
|
||||
|
||||
if (len != null && len > 0)
|
||||
if (len > 0)
|
||||
{
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8618;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8625;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8619;CS8620;CS8625;CS8629;CS1572;CS1573;CS0168;CS4014;CS1998;</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user