修复按年分表的bug
This commit is contained in:
parent
fd548bd258
commit
f5018b6616
|
@ -25,6 +25,7 @@ namespace Sample.BulkConsole
|
|||
});
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var s = Guid.NewGuid().ToString("n");
|
||||
var services = new ServiceCollection();
|
||||
services.AddLogging();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue