private void CreateDataTable(IVirtualTable virtualTable)
        {
            var shardingConfig = virtualTable.ShardingConfig;

            foreach (var tail in virtualTable.GetTaleAllTails())
            {
                if (NeedCreateTable(shardingConfig))
                {
                    try
                    {
                        _tableCreator.CreateTable(virtualTable.EntityType, tail);
                    }
                    catch (Exception)
                    {
                        _logger.LogWarning($"table :{virtualTable.GetOriginalTableName()}{shardingConfig.TailPrefix}{tail} will created");
                    }
                }

                //添加物理表
                virtualTable.AddPhysicTable(new DefaultPhysicTable(virtualTable, tail));
            }
        }
        public void AutoCreateTable(IVirtualTableManager virtualTableManager, IShardingTableCreator tableCreator)
        {
            var allVirtualTables = virtualTableManager.GetAllVirtualTables();

            foreach (var virtualTable in allVirtualTables)
            {
                if (virtualTable.EntityType == typeof(SysUserLogByDay))
                {
                    var now  = DateTime.Now.Date.AddDays(1);
                    var tail = virtualTable.GetVirtualRoute().ShardingKeyToTail(now);
                    try
                    {
                        tableCreator.CreateTable <SysUserLogByDay>(tail);
                        virtualTableManager.AddPhysicTable(virtualTable, new DefaultPhysicTable(virtualTable, tail));
                    }
                    catch (Exception e)
                    {
                        //ignore
                    }
                }
            }
        }