From e8a96ecf61469aa7da9cf006ab30a25fd237c86b Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Mon, 5 Aug 2024 09:15:33 +0800 Subject: [PATCH] =?UTF-8?q?GetClientUserPermissionByToken=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs | 7 +++++++ ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user | 2 +- .../Properties/PublishProfiles/FolderProfile1.pubxml.user | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs index d1d4123e..63a959d6 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs @@ -22,6 +22,7 @@ using System.Data; using DS.WMS.Core.Info.Dtos; using NPOI.SS.Formula.Functions; using DS.WMS.Core.Flow.Dtos; +using Microsoft.Extensions.Logging; namespace DS.WMS.Core.Sys.Method; @@ -36,6 +37,7 @@ public class CommonService : ICommonService private readonly ISaasDbService saasService; private readonly IHttpContextAccessor IhttpContext; private readonly IWebHostEnvironment _environment; + private readonly ILogger _logger; /// /// @@ -49,6 +51,7 @@ public class CommonService : ICommonService saasService = _serviceProvider.GetRequiredService(); IhttpContext = _serviceProvider.GetRequiredService(); _environment = _serviceProvider.GetRequiredService(); + _logger = _serviceProvider.GetRequiredService>(); } #region 后台登录 @@ -588,9 +591,13 @@ public class CommonService : ICommonService public async Task>> GetClientUserPermissionByToken() { List list = new List(); + _logger.LogInformation("GetClientUserPermissionByToken临时日志:user.UserId={userId}", user.UserId); var userId = long.Parse(user.UserId); var userInfo = await db.Queryable().Where(x => x.Id == userId).FirstAsync(); + var sql = db.Queryable().Where(x => x.Id == userId).ToSqlString(); + _logger.LogInformation("GetClientUserPermissionByToken临时日志:sql={sql}", sql); + //超级管理员 if (userInfo.UserType == UserTypeEnum.SupperAdmin.ToEnumInt()) { diff --git a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user index d9493e7a..f2a959bf 100644 --- a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user +++ b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj.user @@ -1,6 +1,6 @@  - D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile1.pubxml + D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile1.pubxml.user b/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile1.pubxml.user index 846bde11..1391282d 100644 --- a/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/ds-wms-service/DS.WMS.MainApi/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>D:\Publish\DS8\Main - True|2024-06-07T07:21:06.7600490Z;True|2024-06-07T15:17:45.6855676+08:00;True|2024-05-31T13:57:26.8256021+08:00;True|2024-05-30T16:18:14.8047074+08:00;True|2024-05-30T09:30:24.9756841+08:00;True|2024-05-29T17:46:22.9869679+08:00;True|2024-05-29T17:20:28.9621862+08:00;True|2024-05-29T17:18:16.4688274+08:00;True|2024-05-29T16:33:42.5152962+08:00;False|2024-05-29T16:33:09.8393409+08:00;False|2024-05-29T16:31:07.7569208+08:00;True|2024-05-28T18:00:39.2399003+08:00;True|2024-05-28T08:47:53.8630073+08:00;True|2024-05-23T17:51:45.6784172+08:00;True|2024-05-21T17:32:52.9294009+08:00; + True|2024-08-05T00:47:56.4462670Z;True|2024-06-07T15:21:06.7600490+08:00;True|2024-06-07T15:17:45.6855676+08:00;True|2024-05-31T13:57:26.8256021+08:00;True|2024-05-30T16:18:14.8047074+08:00;True|2024-05-30T09:30:24.9756841+08:00;True|2024-05-29T17:46:22.9869679+08:00;True|2024-05-29T17:20:28.9621862+08:00;True|2024-05-29T17:18:16.4688274+08:00;True|2024-05-29T16:33:42.5152962+08:00;False|2024-05-29T16:33:09.8393409+08:00;False|2024-05-29T16:31:07.7569208+08:00;True|2024-05-28T18:00:39.2399003+08:00;True|2024-05-28T08:47:53.8630073+08:00;True|2024-05-23T17:51:45.6784172+08:00;True|2024-05-21T17:32:52.9294009+08:00; \ No newline at end of file