From 5beef22269ee2f786081cba123b5714370440ae9 Mon Sep 17 00:00:00 2001 From: chenchun Date: Thu, 30 Oct 2025 14:48:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=EF=BC=88=E5=BA=94=E4=B8=BA?= =?UTF-8?q?=20&&=EF=BC=8C=E9=81=BF=E5=85=8D=E5=A7=8B=E7=BB=88=E6=8A=9B?= =?UTF-8?q?=E5=87=BA=E6=9D=83=E9=99=90=E5=BC=82=E5=B8=B8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正 AiAccountService.GetProfitStatisticsAsync 中的条件判断,原先使用 || 导致即使为 Guo 或 cc 仍被拒绝访问。 --- .../Yi.Framework.AiHub.Application/Services/AiAccountService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/AiAccountService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/AiAccountService.cs index a95f5a2f..3d4daf5c 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/AiAccountService.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/AiAccountService.cs @@ -85,7 +85,7 @@ public class AiAccountService : ApplicationService [HttpGet("account/profit-statistics")] public async Task GetProfitStatisticsAsync([FromQuery] decimal currentCost) { - if (CurrentUser.UserName != "Guo" || CurrentUser.UserName != "cc") + if (CurrentUser.UserName != "Guo" && CurrentUser.UserName != "cc") { throw new UserFriendlyException("您暂无权限访问"); }