mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
fix #I81YQA SqlSugar使用MySql时异常
This commit is contained in:
@@ -9,6 +9,10 @@ using SqlSugar;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
/// <summary>
|
||||
/// SqlSugar基础类
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public abstract class SqlSugarBaseApp<T> where T : class, new()
|
||||
{
|
||||
protected ISqlSugarClient SugarClient;
|
||||
@@ -23,6 +27,16 @@ namespace OpenAuth.App
|
||||
SugarClient = client;
|
||||
_auth = auth;
|
||||
}
|
||||
|
||||
public void Delete(string[] ids)
|
||||
{
|
||||
Repository.DeleteByIds(ids);
|
||||
}
|
||||
|
||||
public T Get(string id)
|
||||
{
|
||||
return SugarClient.Queryable<T>().Where("Id=@id", new {id = id}).First();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前登录用户的数据访问权限
|
||||
|
Reference in New Issue
Block a user