GetClientUserPermissionByToken接口添加日志

usertest
zhangxiaofeng 4 months ago
parent 05a32a12e6
commit e8a96ecf61

@ -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<CommonService> _logger;
/// <summary>
///
@ -49,6 +51,7 @@ public class CommonService : ICommonService
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
IhttpContext = _serviceProvider.GetRequiredService<IHttpContextAccessor>();
_environment = _serviceProvider.GetRequiredService<IWebHostEnvironment>();
_logger = _serviceProvider.GetRequiredService<ILogger<CommonService>>();
}
#region 后台登录
@ -588,9 +591,13 @@ public class CommonService : ICommonService
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissionByToken()
{
List<RouteItem> list = new List<RouteItem>();
_logger.LogInformation("GetClientUserPermissionByToken临时日志user.UserId={userId}", user.UserId);
var userId = long.Parse(user.UserId);
var userInfo = await db.Queryable<SysUser>().Where(x => x.Id == userId).FirstAsync();
var sql = db.Queryable<SysUser>().Where(x => x.Id == userId).ToSqlString();
_logger.LogInformation("GetClientUserPermissionByToken临时日志sql={sql}", sql);
//超级管理员
if (userInfo.UserType == UserTypeEnum.SupperAdmin.ToEnumInt())
{

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
</Project>

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\Main</_PublishTargetUrl>
<History>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;</History>
<History>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;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Loading…
Cancel
Save