From 5de05619460ce7f06e403f392c33d0becfa0b3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Tue, 20 Aug 2024 00:41:42 +0800 Subject: [PATCH] [fix] InsertOnly --- .../\345\272\224\347\224\250\345\216\206\345\217\262.Biz.cs" | 2 ++ AntJob.Web/Areas/Ant/Controllers/AppHistoryController.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git "a/AntJob.Data/Entity/\345\272\224\347\224\250\345\216\206\345\217\262.Biz.cs" "b/AntJob.Data/Entity/\345\272\224\347\224\250\345\216\206\345\217\262.Biz.cs" index f8c1af4..15d343d 100644 --- "a/AntJob.Data/Entity/\345\272\224\347\224\250\345\216\206\345\217\262.Biz.cs" +++ "b/AntJob.Data/Entity/\345\272\224\347\224\250\345\216\206\345\217\262.Biz.cs" @@ -13,6 +13,8 @@ public partial class AppHistory : EntityBase #region 对象操作 static AppHistory() { + Meta.Table.DataTable.InsertOnly = true; + // 累加字段 //var df = Meta.Factory.AdditionalFields; //df.Add(__.AppID); diff --git a/AntJob.Web/Areas/Ant/Controllers/AppHistoryController.cs b/AntJob.Web/Areas/Ant/Controllers/AppHistoryController.cs index 947794a..8201fbf 100644 --- a/AntJob.Web/Areas/Ant/Controllers/AppHistoryController.cs +++ b/AntJob.Web/Areas/Ant/Controllers/AppHistoryController.cs @@ -15,7 +15,7 @@ public class AppHistoryController : AntEntityController { static AppHistoryController() { - AppOnline.Meta.Table.DataTable.InsertOnly = true; + //AppHistory.Meta.Table.DataTable.InsertOnly = true; ListFields.RemoveField("Id", "Version", "CompileTime", ""); ListFields.AddListField("Remark", null, "TraceId");