浏览代码

修改代码位置

zhontai 3 年之前
父节点
当前提交
4eb4ccce68
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Admin.Core/Db/DBServiceCollectionExtensions.cs

+ 2 - 1
Admin.Core/Db/DBServiceCollectionExtensions.cs

@@ -67,12 +67,13 @@ namespace Admin.Core.Db
                 DbHelper.SyncStructure(fsql, dbConfig: dbConfig, appConfig: appConfig);
                 DbHelper.SyncStructure(fsql, dbConfig: dbConfig, appConfig: appConfig);
             }
             }
 
 
+            var user = services.BuildServiceProvider().GetService<IUser>();
+
             #region 审计数据
             #region 审计数据
 
 
             //计算服务器时间
             //计算服务器时间
             var serverTime = fsql.Select<DualEntity>().Limit(1).First(a => DateTime.UtcNow);
             var serverTime = fsql.Select<DualEntity>().Limit(1).First(a => DateTime.UtcNow);
             var timeOffset = DateTime.UtcNow.Subtract(serverTime);
             var timeOffset = DateTime.UtcNow.Subtract(serverTime);
-            var user = services.BuildServiceProvider().GetService<IUser>();
             DbHelper.TimeOffset = timeOffset;
             DbHelper.TimeOffset = timeOffset;
             fsql.Aop.AuditValue += (s, e) =>
             fsql.Aop.AuditValue += (s, e) =>
             {
             {