From 05a3e0a264a82f58a5bbefdf10940edbf568602d Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 15 Apr 2024 18:17:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Common/Attribute/FromFilterAttribute.cs | 3 ++- Tiobon.Core.Repository/BASE/BaseRepository.cs | 2 -- Tiobon.Core.Services/AdvertisementServices.cs | 4 ++-- Tiobon.Core.Tests/Common_Test/HttpHelper_Should.cs | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Tiobon.Core.Common/Attribute/FromFilterAttribute.cs b/Tiobon.Core.Common/Attribute/FromFilterAttribute.cs index 67ac1cbb..2c11b6fd 100644 --- a/Tiobon.Core.Common/Attribute/FromFilterAttribute.cs +++ b/Tiobon.Core.Common/Attribute/FromFilterAttribute.cs @@ -91,8 +91,9 @@ namespace Tiobon.Core.Common queryFilter.PredicateValues[i] = v; } } - catch (Exception ex) + catch (Exception) { + throw; //LoggerHelper.SendLogError($"QueryFilter.PredicateValues[{i}] [{queryFilter.PredicateValues[i]}] 反序列化失败\r\n" + // $"请求地址: {bindingContext.HttpContext.Request.GetEncodedUrl()}\r\n" + // $"错误信息: {ex}"); diff --git a/Tiobon.Core.Repository/BASE/BaseRepository.cs b/Tiobon.Core.Repository/BASE/BaseRepository.cs index 8690b17f..8171c778 100644 --- a/Tiobon.Core.Repository/BASE/BaseRepository.cs +++ b/Tiobon.Core.Repository/BASE/BaseRepository.cs @@ -1,5 +1,4 @@ using System.Data; -using System.Linq.Dynamic.Core; using System.Linq.Expressions; using System.Reflection; using SqlSugar; @@ -10,7 +9,6 @@ using Tiobon.Core.Model; using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Tenants; using Tiobon.Core.Repository.UnitOfWorks; -using static Org.BouncyCastle.Math.EC.ECCurve; namespace Tiobon.Core.Repository.Base { diff --git a/Tiobon.Core.Services/AdvertisementServices.cs b/Tiobon.Core.Services/AdvertisementServices.cs index dec06674..6f420684 100644 --- a/Tiobon.Core.Services/AdvertisementServices.cs +++ b/Tiobon.Core.Services/AdvertisementServices.cs @@ -10,8 +10,8 @@ namespace Tiobon.Core.Services public void ReturnExp() { - int a = 1; - int b = 0; + //int a = 1; + //int b = 0; // int c = a / b; } diff --git a/Tiobon.Core.Tests/Common_Test/HttpHelper_Should.cs b/Tiobon.Core.Tests/Common_Test/HttpHelper_Should.cs index cb96a355..6d58281a 100644 --- a/Tiobon.Core.Tests/Common_Test/HttpHelper_Should.cs +++ b/Tiobon.Core.Tests/Common_Test/HttpHelper_Should.cs @@ -7,9 +7,9 @@ namespace Tiobon.Core.Tests.Common_Test { [Fact] - public void Get_Async_Test() + public async void Get_Async_Test() { - var responseString = HttpHelper.GetAsync("http://apk.neters.club/api/Tiobon").Result; + var responseString = (await HttpHelper.GetAsync("http://apk.neters.club/api/Tiobon")); Assert.NotNull(responseString); } @@ -17,7 +17,7 @@ namespace Tiobon.Core.Tests.Common_Test [Fact] public void Post_Async_Test() { - var responseString = HttpHelper.PostAsync("http://apk.neters.club/api/Login/swgLogin", "{\"name\":\"admin\",\"pwd\":\"admin\"}").Result; + var responseString = HttpHelper.PostAsync("http://apk.neters.club/api/Login/swgLogin", "{\"name\":\"admin\",\"pwd\":\"admin\"}"); Assert.NotNull(responseString); }