fix #I81YQA SqlSugar使用MySql时异常

This commit is contained in:
wintel
2023-09-17 11:41:42 +08:00
parent 852d52436a
commit 367158e33f
4 changed files with 28 additions and 23 deletions

View File

@@ -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>
/// 获取当前登录用户的数据访问权限