From 2e93d2dfa84bee16f15921fc3b339ce2bd69b973 Mon Sep 17 00:00:00 2001 From: xuejiaming <326308290@qq.com> Date: Wed, 4 Jan 2023 14:59:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E5=B9=B4=E5=88=86?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractSimpleShardingYearKeyDateTimeVirtualTableRoute.cs | 2 +- .../Years/AbstractSimpleShardingYearKeyLongVirtualTableRoute.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyDateTimeVirtualTableRoute.cs b/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyDateTimeVirtualTableRoute.cs index cef83a47..637ee45f 100644 --- a/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyDateTimeVirtualTableRoute.cs +++ b/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyDateTimeVirtualTableRoute.cs @@ -18,7 +18,7 @@ namespace ShardingCore.VirtualRoutes.Years public abstract DateTime GetBeginTime(); protected override List CalcTailsOnStart() { - var beginTime = GetBeginTime().Date; + var beginTime = new DateTime(GetBeginTime().Year,1,1); var tails=new List(); //提前创建表 diff --git a/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyLongVirtualTableRoute.cs b/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyLongVirtualTableRoute.cs index 22113399..7aab51a5 100644 --- a/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyLongVirtualTableRoute.cs +++ b/src/ShardingCore/VirtualRoutes/Years/AbstractSimpleShardingYearKeyLongVirtualTableRoute.cs @@ -27,7 +27,7 @@ namespace ShardingCore.VirtualRoutes.Years /// protected override List CalcTailsOnStart() { - var beginTime = GetBeginTime().Date; + var beginTime = new DateTime(GetBeginTime().Year,1,1); var tails=new List(); //提前创建表