From 61b3be0f8f7538c2338ebe2c113e12759f59c04f Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 13 Nov 2018 02:00:47 +0800 Subject: [PATCH] - --- .../Abstract/UpdateProvider/UpdateableProvider.cs | 1 + Src/Asp.Net/SqlSugar/Entities/DiffLogModel.cs | 1 + Src/Asp.Net/SqlSugar/Entities/DiffType.cs | 14 ++++++++++++++ Src/Asp.Net/SqlSugar/SqlSugar.csproj | 1 + 4 files changed, 17 insertions(+) create mode 100644 Src/Asp.Net/SqlSugar/Entities/DiffType.cs diff --git a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs index a95cf0596..bde749f82 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs @@ -99,6 +99,7 @@ namespace SqlSugar diffModel = new DiffLogModel(); this.IsEnableDiffLogEvent = true; diffModel.BusinessData = businessData; + diffModel.DiffType = DiffType.update; return this; } diff --git a/Src/Asp.Net/SqlSugar/Entities/DiffLogModel.cs b/Src/Asp.Net/SqlSugar/Entities/DiffLogModel.cs index c549fb3f4..40f972d84 100644 --- a/Src/Asp.Net/SqlSugar/Entities/DiffLogModel.cs +++ b/Src/Asp.Net/SqlSugar/Entities/DiffLogModel.cs @@ -13,6 +13,7 @@ namespace SqlSugar public string Sql { get; set; } public TimeSpan? Time { get; set; } public object BusinessData { get; set; } + public DiffType DiffType { get; set; } } public class DiffLogTableInfo { diff --git a/Src/Asp.Net/SqlSugar/Entities/DiffType.cs b/Src/Asp.Net/SqlSugar/Entities/DiffType.cs new file mode 100644 index 000000000..08dc77a28 --- /dev/null +++ b/Src/Asp.Net/SqlSugar/Entities/DiffType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace SqlSugar +{ + public enum DiffType + { + insert=0, + update=1, + delete=2 + } +} diff --git a/Src/Asp.Net/SqlSugar/SqlSugar.csproj b/Src/Asp.Net/SqlSugar/SqlSugar.csproj index 4d63d644b..07182428d 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugar.csproj +++ b/Src/Asp.Net/SqlSugar/SqlSugar.csproj @@ -79,6 +79,7 @@ +