From 7cd4ceb736e6cb70130892fa5eac35c4d4841e8f Mon Sep 17 00:00:00 2001 From: xuejiaming <326308290@qq.com> Date: Wed, 25 Aug 2021 13:22:32 +0800 Subject: [PATCH] 1 --- src/ShardingCore/Sharding/ReWrite/ReWriteEngine.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ShardingCore/Sharding/ReWrite/ReWriteEngine.cs b/src/ShardingCore/Sharding/ReWrite/ReWriteEngine.cs index 5f583bc0..a4e7df72 100644 --- a/src/ShardingCore/Sharding/ReWrite/ReWriteEngine.cs +++ b/src/ShardingCore/Sharding/ReWrite/ReWriteEngine.cs @@ -30,18 +30,18 @@ namespace ShardingCore.Core.Internal.StreamMerge.ReWrite //去除分页,获取前Take+Skip数量 var reWriteQueryable = _queryable; - if (skip.HasValue) - { - reWriteQueryable = _queryable.RemoveSkip(); - } - if (take.HasValue&& skip.GetValueOrDefault()>0) + if (take.HasValue) { reWriteQueryable = _queryable.RemoveTake(); } + if (skip.HasValue) + { + reWriteQueryable = _queryable.RemoveSkip(); + } - //if (take.HasValue) - // reWriteQueryable = reWriteQueryable.Take(take.Value + skip.GetValueOrDefault()); + if (take.HasValue) + reWriteQueryable = reWriteQueryable.Take(take.Value + skip.GetValueOrDefault()); //包含group by if (extraEntry.GroupByContext.GroupExpression != null) {