|
|
@ -22,6 +22,7 @@ using System.Data;
|
|
|
|
using DS.WMS.Core.Info.Dtos;
|
|
|
|
using DS.WMS.Core.Info.Dtos;
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
using DS.WMS.Core.Flow.Dtos;
|
|
|
|
using DS.WMS.Core.Flow.Dtos;
|
|
|
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Sys.Method;
|
|
|
|
namespace DS.WMS.Core.Sys.Method;
|
|
|
|
|
|
|
|
|
|
|
@ -36,6 +37,7 @@ public class CommonService : ICommonService
|
|
|
|
private readonly ISaasDbService saasService;
|
|
|
|
private readonly ISaasDbService saasService;
|
|
|
|
private readonly IHttpContextAccessor IhttpContext;
|
|
|
|
private readonly IHttpContextAccessor IhttpContext;
|
|
|
|
private readonly IWebHostEnvironment _environment;
|
|
|
|
private readonly IWebHostEnvironment _environment;
|
|
|
|
|
|
|
|
private readonly ILogger<CommonService> _logger;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
///
|
|
|
@ -49,6 +51,7 @@ public class CommonService : ICommonService
|
|
|
|
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
|
|
|
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
|
|
|
IhttpContext = _serviceProvider.GetRequiredService<IHttpContextAccessor>();
|
|
|
|
IhttpContext = _serviceProvider.GetRequiredService<IHttpContextAccessor>();
|
|
|
|
_environment = _serviceProvider.GetRequiredService<IWebHostEnvironment>();
|
|
|
|
_environment = _serviceProvider.GetRequiredService<IWebHostEnvironment>();
|
|
|
|
|
|
|
|
_logger = _serviceProvider.GetRequiredService<ILogger<CommonService>>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 后台登录
|
|
|
|
#region 后台登录
|
|
|
@ -588,9 +591,13 @@ public class CommonService : ICommonService
|
|
|
|
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissionByToken()
|
|
|
|
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissionByToken()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<RouteItem> list = new List<RouteItem>();
|
|
|
|
List<RouteItem> list = new List<RouteItem>();
|
|
|
|
|
|
|
|
_logger.LogInformation("GetClientUserPermissionByToken临时日志:user.UserId={userId}", user.UserId);
|
|
|
|
var userId = long.Parse(user.UserId);
|
|
|
|
var userId = long.Parse(user.UserId);
|
|
|
|
|
|
|
|
|
|
|
|
var userInfo = await db.Queryable<SysUser>().Where(x => x.Id == userId).FirstAsync();
|
|
|
|
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())
|
|
|
|
if (userInfo.UserType == UserTypeEnum.SupperAdmin.ToEnumInt())
|
|
|
|
{
|
|
|
|
{
|
|
|
|