修复按年分表的bug

This commit is contained in:
xuejiaming 2023-01-04 14:51:09 +08:00
parent fd548bd258
commit f5018b6616
3 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,7 @@ namespace Sample.BulkConsole
});
static void Main(string[] args)
{
var s = Guid.NewGuid().ToString("n");
var services = new ServiceCollection();
services.AddLogging();

View File

@ -22,7 +22,8 @@ namespace ShardingCore.VirtualRoutes.Years
var tails=new List<string>();
//提前创建表
var nowTimeStamp = DateTime.Now.Date;
var now = DateTime.Now;
var nowTimeStamp = new DateTime(now.Year,1,1);
if (beginTime > nowTimeStamp)
throw new ArgumentException("begin time error");
var currentTimeStamp = beginTime;

View File

@ -31,7 +31,8 @@ namespace ShardingCore.VirtualRoutes.Years
var tails=new List<string>();
//提前创建表
var nowTimeStamp = DateTime.Now.Date;
var now = DateTime.Now;
var nowTimeStamp = new DateTime(now.Year,1,1);
if (beginTime > nowTimeStamp)
throw new ArgumentException("begin time error");
var currentTimeStamp = beginTime;