From b8477b7d9672e966aee502a129fd4b1c22db57dc Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Fri, 8 Nov 2024 08:49:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Helper/ExceptionFormatHelper.cs | 26 +++++++++++++++++++ EntrustSettle.Model/Base/ITenantEntity.cs | 2 ++ .../Models/Systems/BusinessTable.cs | 13 +++------- 3 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 EntrustSettle.Common/Helper/ExceptionFormatHelper.cs diff --git a/EntrustSettle.Common/Helper/ExceptionFormatHelper.cs b/EntrustSettle.Common/Helper/ExceptionFormatHelper.cs new file mode 100644 index 0000000..9ef6cb5 --- /dev/null +++ b/EntrustSettle.Common/Helper/ExceptionFormatHelper.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace InvoicePlat.Common.Helper +{ + public static class ExceptionFormatHelper + { + /// + /// 自定义返回格式 + /// + /// + /// + /// + public static string Format(string throwMsg, Exception ex) + { + return string.Format(@" +【自定义错误】:{0} +【异常类型】:{1} +【异常信息】:{2} +【堆栈调用】:{3}", [throwMsg, ex.GetType().Name, ex.Message, ex.StackTrace]); + } + } +} diff --git a/EntrustSettle.Model/Base/ITenantEntity.cs b/EntrustSettle.Model/Base/ITenantEntity.cs index 2647132..e10abfc 100644 --- a/EntrustSettle.Model/Base/ITenantEntity.cs +++ b/EntrustSettle.Model/Base/ITenantEntity.cs @@ -12,4 +12,6 @@ public interface ITenantEntity /// [SugarColumn(DefaultValue = "0")] public long TenantId { get; set; } + //[SugarColumn(DefaultValue = "")] + //public string TenantName { get; set; } } \ No newline at end of file diff --git a/EntrustSettle.Model/Models/Systems/BusinessTable.cs b/EntrustSettle.Model/Models/Systems/BusinessTable.cs index 80eda8a..5bb8a64 100644 --- a/EntrustSettle.Model/Models/Systems/BusinessTable.cs +++ b/EntrustSettle.Model/Models/Systems/BusinessTable.cs @@ -10,14 +10,9 @@ public class BusinessTable : BaseEntity, ITenantEntity /// 无需手动赋值 /// public long TenantId { get; set; } + ///// + ///// 租户名称 + ///// + //string TenantName { get; set; } - /// - /// 名称 - /// - public string Name { get; set; } - - /// - /// 金额 - /// - public decimal Amount { get; set; } } \ No newline at end of file