Просмотр исходного кода

生成sql脚本传时间和操作人

lichunlei 3 месяцев назад
Родитель
Сommit
81567ebf0a
3 измененных файлов с 6 добавлено и 2 удалено
  1. 2 1
      Services/DatabaseFieldService.cs
  2. 2 0
      Services/DatabaseInfoService.cs
  3. 2 1
      Services/DatabaseTableService.cs

+ 2 - 1
Services/DatabaseFieldService.cs

@@ -102,7 +102,8 @@ namespace Services
             List<int> fieldIds = param.id.ToList();
             List<int> fieldIds = param.id.ToList();
             List<DatabaseField> fields = GetList(m => fieldIds.Contains(m.id));
             List<DatabaseField> fields = GetList(m => fieldIds.Contains(m.id));
 
 
-            Dictionary<string, object> pushData = new Dictionary<string, object>();
+            Dictionary<string, object> pushData = new Dictionary<string, object>();pushData.Add("since", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+            pushData.Add("author", loginUser.username);
             pushData.Add("opType", "add");
             pushData.Add("opType", "add");
             pushData.Add("tableName", tableName);
             pushData.Add("tableName", tableName);
             pushData.Add("databaseField", fields);
             pushData.Add("databaseField", fields);

+ 2 - 0
Services/DatabaseInfoService.cs

@@ -66,6 +66,8 @@ namespace Services
             }
             }
 
 
             Dictionary<string, object> pushData = new Dictionary<string, object>();
             Dictionary<string, object> pushData = new Dictionary<string, object>();
+            pushData.Add("since", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+            pushData.Add("author", loginUser.username);
             pushData.Add("databaseInfo", databaseInfo);
             pushData.Add("databaseInfo", databaseInfo);
             pushData.Add("databaseTable", tables);
             pushData.Add("databaseTable", tables);
             MakeHelper.Push(pushData, "db", "db", loginUser);
             MakeHelper.Push(pushData, "db", "db", loginUser);

+ 2 - 1
Services/DatabaseTableService.cs

@@ -206,7 +206,8 @@ namespace Services
                 table.fields = _DatabaseFieldService.GetList(m => m.tableId == table.id);
                 table.fields = _DatabaseFieldService.GetList(m => m.tableId == table.id);
             }
             }
 
 
-            Dictionary<string, object> pushData = new Dictionary<string, object>();
+            Dictionary<string, object> pushData = new Dictionary<string, object>();pushData.Add("since", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+            pushData.Add("author", loginUser.username);
             pushData.Add("databaseTable", tables);
             pushData.Add("databaseTable", tables);
             MakeHelper.Push(pushData, "dbTable", "dbTable", loginUser);
             MakeHelper.Push(pushData, "dbTable", "dbTable", loginUser);
         }
         }