修复按年分表的bug

This commit is contained in:
xuejiaming 2023-01-04 14:51:56 +08:00
parent d1e6beb9d1
commit b430ca5e36
2 changed files with 4 additions and 2 deletions

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;