删除没用代码

This commit is contained in:
不做码农 2022-04-10 09:46:55 +08:00
parent 6967d2083f
commit 3906b7b44c
3 changed files with 3 additions and 8 deletions

View File

@ -11,8 +11,6 @@ namespace Infrastructure
public static string ConnBus = "conn_bus";
public static string ConnBusDbType = "conn_bus_type";
public static string DbKey = "DbKey";
public string Redis { get; set; }
public string Database { get; set; }
/// <summary>

View File

@ -131,7 +131,7 @@ namespace ZR.Admin.WebApi.Framework
{
var userData = jwtToken.FirstOrDefault(x => x.Type == ClaimTypes.UserData).Value;
var loginUser = JsonConvert.DeserializeObject<LoginUser>(userData);
var permissions = loginUser.Permissions;//TODO (List<string>)CacheHelper.GetCache(GlobalConstant.UserPermKEY + loginUser?.UserId);
var permissions = (List<string>)CacheHelper.GetCache(GlobalConstant.UserPermKEY + loginUser?.UserId);
if (loginUser?.UserName == "admin")
{
permissions = new List<string>() { GlobalConstant.AdminPerm };

View File

@ -1,12 +1,9 @@
using Infrastructure.Model;
using SqlSugar;
using SqlSugar;
using SqlSugar.IOC;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using ZR.Model;
namespace ZR.Repository
@ -35,7 +32,7 @@ namespace ZR.Repository
itenant = DbScoped.SugarScope;//设置租户接口
if (Context == null)
{
Context = context ?? DbScoped.SugarScope.GetConnection(1);//根据类传入的ConfigId自动选择
Context = DbScoped.SugarScope.GetConnection(1);//根据类传入的ConfigId自动选择
}
}