mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 18:34:55 +08:00
-
This commit is contained in:
@@ -125,31 +125,36 @@ namespace SqlSugar
|
|||||||
this.Context.Utilities.PageEach(allDatas, 300, itemList =>
|
this.Context.Utilities.PageEach(allDatas, 300, itemList =>
|
||||||
{
|
{
|
||||||
List<IConditionalModel> conditList = new List<IConditionalModel>();
|
List<IConditionalModel> conditList = new List<IConditionalModel>();
|
||||||
var condition = new ConditionalCollections()
|
SetConditList(itemList, whereColumns, conditList);
|
||||||
{
|
var addItem = this.Context.Queryable<T>().Where(conditList).ToList();
|
||||||
ConditionalList = new List<KeyValuePair<WhereType, SqlSugar.ConditionalModel>>()
|
this.dbDataList.AddRange(addItem);
|
||||||
};
|
|
||||||
foreach (var dataItem in itemList)
|
|
||||||
{
|
|
||||||
foreach (var item in whereColumns)
|
|
||||||
{
|
|
||||||
conditList.Add(condition);
|
|
||||||
condition.ConditionalList.Add(new KeyValuePair<WhereType, ConditionalModel>(WhereType.And, new ConditionalModel()
|
|
||||||
{
|
|
||||||
FieldName = item.DbColumnName,
|
|
||||||
ConditionalType = ConditionalType.Equal,
|
|
||||||
FieldValue = item.PropertyInfo.GetValue(dataItem,null)+""
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
var addItem = this.Context.Queryable<T>().Where(conditList).ToList();
|
|
||||||
this.dbDataList.AddRange(addItem);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void SetConditList(List<StorageableInfo<T>> itemList, List<EntityColumnInfo> whereColumns, List<IConditionalModel> conditList)
|
||||||
|
{
|
||||||
|
var condition = new ConditionalCollections()
|
||||||
|
{
|
||||||
|
ConditionalList = new List<KeyValuePair<WhereType, SqlSugar.ConditionalModel>>()
|
||||||
|
};
|
||||||
|
foreach (var dataItem in itemList)
|
||||||
|
{
|
||||||
|
foreach (var item in whereColumns)
|
||||||
|
{
|
||||||
|
conditList.Add(condition);
|
||||||
|
condition.ConditionalList.Add(new KeyValuePair<WhereType, ConditionalModel>(WhereType.And, new ConditionalModel()
|
||||||
|
{
|
||||||
|
FieldName = item.DbColumnName,
|
||||||
|
ConditionalType = ConditionalType.Equal,
|
||||||
|
FieldValue = item.PropertyInfo.GetValue(dataItem, null) + ""
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public virtual ExpressionResult GetExpressionValue(Expression expression, ResolveExpressType resolveType)
|
public virtual ExpressionResult GetExpressionValue(Expression expression, ResolveExpressType resolveType)
|
||||||
{
|
{
|
||||||
ILambdaExpressions resolveExpress = InstanceFactory.GetLambdaExpressions(this.Context.CurrentConnectionConfig); ;
|
ILambdaExpressions resolveExpress = InstanceFactory.GetLambdaExpressions(this.Context.CurrentConnectionConfig); ;
|
||||||
|
|||||||
Reference in New Issue
Block a user