From a31cdb86a9f69c83abf0d0ba0864238b5d04dd9e Mon Sep 17 00:00:00 2001 From: cjy Date: Mon, 5 Aug 2024 14:42:47 +0800 Subject: [PATCH] =?UTF-8?q?redis=E9=93=BE=E6=8E=A5=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.Module.RedisModule/IRedisService.cs | 5 ++ .../DS.Module.RedisModule/RedisService.cs | 8 ++- .../DS.Module.SqlSugar/SqlSugarDiffUtil.cs | 5 ++ .../DS.WMS.Core/Op/Entity/OpBusinessLog.cs | 58 +++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 ds-wms-service/DS.WMS.Core/Op/Entity/OpBusinessLog.cs diff --git a/ds-wms-service/DS.Module.RedisModule/IRedisService.cs b/ds-wms-service/DS.Module.RedisModule/IRedisService.cs index 93d249c9..d1cf526e 100644 --- a/ds-wms-service/DS.Module.RedisModule/IRedisService.cs +++ b/ds-wms-service/DS.Module.RedisModule/IRedisService.cs @@ -80,5 +80,10 @@ namespace DS.Module.RedisModule /// /// void DeleteLike(string key); + + /// + /// 释放Redis链接 + /// + void Dispose(); } } diff --git a/ds-wms-service/DS.Module.RedisModule/RedisService.cs b/ds-wms-service/DS.Module.RedisModule/RedisService.cs index 1d5ce7f8..300eb15c 100644 --- a/ds-wms-service/DS.Module.RedisModule/RedisService.cs +++ b/ds-wms-service/DS.Module.RedisModule/RedisService.cs @@ -263,7 +263,13 @@ namespace DS.Module.RedisModule csRedis.Eval(luaScript, lockKey, new[] { lockValue }); } - + /// + /// 释放Redis链接 + /// + public void Dispose() + { + csRedis.Dispose(); + } } } diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlSugarDiffUtil.cs b/ds-wms-service/DS.Module.SqlSugar/SqlSugarDiffUtil.cs index 47a73240..46e4784e 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlSugarDiffUtil.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlSugarDiffUtil.cs @@ -70,9 +70,14 @@ public static class SqlSugarDiffUtil private static readonly List IgnoreColumns = new List() { "CreateTime", + "CreateUserName", "CreateBy", "UpdateTime", + "UpdateUserName", "UpdateBy", + "DeleteTime", + "DeleteUserName", + "DeleteBy", }; } diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/OpBusinessLog.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/OpBusinessLog.cs new file mode 100644 index 00000000..fc7ed2fc --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/OpBusinessLog.cs @@ -0,0 +1,58 @@ +using DS.Module.Core.Data; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DS.WMS.Core.Op.Entity +{ + /// + /// 业务日志 + /// + [SqlSugar.SugarTable("op_business_log", "业务日志")] + public class OpBusinessLog : BaseModel + { + /// + /// 业务id + /// + [SugarColumn(ColumnDescription = "业务id")] + public long? BusinessId { get; set; } + /// + /// 操作方式:新增(Create)、更新(Update)、删除(Delete) + /// + + [SugarColumn(ColumnDescription = "操作方式:新增(Create)、更新(Update)、删除(Delete) ",IsNullable = false,Length =20)] + public string OperateType { get; set; } + /// + /// 旧值 + /// + [SugarColumn(ColumnDescription = "旧值", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)] + public string OldValue { get; set; } + /// + /// 新值 + /// + [SugarColumn(ColumnDescription = "新值", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)] + public string NewValue { get; set; } + /// + /// 差异数据 + /// + [SugarColumn(ColumnDescription = "差异数据", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)] + public string DiffData { get; set; } + + /// + /// 业务来源代码 + /// + + [SugarColumn(ColumnDescription = "业务来源代码", IsNullable = true, Length = 100)] + public string SourceCode { get; set; } + /// + /// 业务来源 + /// + + [SugarColumn(ColumnDescription = "业务来源", IsNullable = false, Length = 100)] + public string SourceName { get; set; } + + } +}