新增速率限制,调整本地文件上传,服务监控IP取本机网络IP,仓储增加方法

This commit is contained in:
2023-09-22 15:46:43 +08:00
parent d3556cc058
commit ee9f6bacf3
24 changed files with 822 additions and 24 deletions
+51 -5
View File
@@ -58,14 +58,38 @@ namespace ZR.Repository
{
return Context.Insertable(t);
}
public IInsertable<T> Insertable(List<T> t)
{
return Context.Insertable<T>(t);
}
public IInsertable<T> Insertable(T[] t)
{
return Context.Insertable<T>(t);
}
public InsertNavTaskInit<T, T> InsertNav(T t)
{
return Context.InsertNav(t);
}
public InsertNavTaskInit<T, T> InsertNav(List<T> t)
{
return Context.InsertNav(t);
}
#endregion add
#region update
//public IUpdateable<T> Updateable(T entity)
//{
// return Context.Updateable(entity);
//}
public IUpdateable<T> Updateable(T entity)
{
return Context.Updateable(entity);
}
public IUpdateable<T> Updateable(List<T> t)
{
return Context.Updateable<T>(t);
}
public IUpdateable<T> Updateable(T[] t)
{
return Context.Updateable<T>(t);
}
/// <summary>
/// 实体根据主键更新
/// </summary>
@@ -114,7 +138,25 @@ namespace ZR.Repository
{
return Context.Updateable<T>().SetColumns(columns).Where(where).RemoveDataCache().ExecuteCommand();
}
public UpdateNavTaskInit<T, T> UpdateNav(T t)
{
return Context.UpdateNav(t);
}
public UpdateNavTaskInit<T, T> UpdateNav(List<T> t)
{
return Context.UpdateNav(t);
}
#endregion update
public IStorageable<T> Storageable(T t)
{
return Context.Storageable<T>(t);
}
public IStorageable<T> Storageable(List<T> t)
{
return Context.Storageable(t);
}
public DbResult<bool> UseTran(Action action)
{
@@ -190,6 +232,10 @@ namespace ZR.Repository
{
return Context.DbMaintenance.TruncateTable<T>();
}
public DeleteNavTaskInit<T, T> DeleteNav(Expression<Func<T, bool>> whereExpression)
{
return Context.DeleteNav(whereExpression);
}
#endregion delete
#region query
+15 -1
View File
@@ -16,9 +16,17 @@ namespace ZR.Repository
int Insert(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true);
IInsertable<T> Insertable(T t);
IInsertable<T> Insertable(List<T> t);
IInsertable<T> Insertable(T[] t);
InsertNavTaskInit<T, T> InsertNav(T t);
InsertNavTaskInit<T, T> InsertNav(List<T> t);
#endregion add
#region update
IUpdateable<T> Updateable(T entity);
IUpdateable<T> Updateable(List<T> t);
IUpdateable<T> Updateable(T[] t);
int Update(T entity, bool ignoreNullColumns = false, object data = null);
/// <summary>
@@ -32,8 +40,14 @@ namespace ZR.Repository
int Update(T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where);
int Update(Expression<Func<T, bool>> where, Expression<Func<T, T>> columns);
UpdateNavTaskInit<T, T> UpdateNav(T t);
UpdateNavTaskInit<T, T> UpdateNav(List<T> t);
#endregion update
IStorageable<T> Storageable(T t);
IStorageable<T> Storageable(List<T> t);
DbResult<bool> UseTran(Action action);
DbResult<bool> UseTran(SqlSugarClient client, Action action);
@@ -46,7 +60,7 @@ namespace ZR.Repository
int Delete(object id, string title = "");
int DeleteTable();
bool Truncate();
DeleteNavTaskInit<T, T> DeleteNav(Expression<Func<T, bool>> whereExpression);
#endregion delete
#region query