From b95c9e7fdb83da12800e2de1f0f35524d2db7af5 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Thu, 7 May 2020 09:43:46 +0800 Subject: [PATCH] Renamed RefundRecord --- .../EShopPaymentDomainModule.cs | 2 +- .../Payments/FreePaymentServiceProvider.cs | 2 ++ .../{RefundRecords/RefundRecord.cs => Refunds/Refund.cs} | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) rename modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/{RefundRecords/RefundRecord.cs => Refunds/Refund.cs} (80%) diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EShopPaymentDomainModule.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EShopPaymentDomainModule.cs index 25f908c1..ca29831b 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EShopPaymentDomainModule.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EShopPaymentDomainModule.cs @@ -16,7 +16,7 @@ namespace EasyAbp.EShop.Payments { var resolver = context.ServiceProvider.GetService(); - resolver.TryRegisterProviderAsync("Free", typeof(FreePaymentServiceProvider)); + resolver.TryRegisterProviderAsync(FreePaymentServiceProvider.PaymentMethod, typeof(FreePaymentServiceProvider)); } } } diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/Payments/FreePaymentServiceProvider.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/Payments/FreePaymentServiceProvider.cs index 050a561c..6637f6d1 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/Payments/FreePaymentServiceProvider.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/Payments/FreePaymentServiceProvider.cs @@ -8,6 +8,8 @@ namespace EasyAbp.EShop.Payments.Payments [Dependency(ServiceLifetime.Transient, TryRegister = true)] public class FreePaymentServiceProvider : IPaymentServiceProvider { + public const string PaymentMethod = "Free"; + public FreePaymentServiceProvider() { diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/RefundRecords/RefundRecord.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/Refunds/Refund.cs similarity index 80% rename from modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/RefundRecords/RefundRecord.cs rename to modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/Refunds/Refund.cs index 541dca22..588a827f 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/RefundRecords/RefundRecord.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/Refunds/Refund.cs @@ -4,9 +4,9 @@ using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; -namespace EasyAbp.EShop.Payments.RefundRecords +namespace EasyAbp.EShop.Payments.Refunds { - public class RefundRecord : FullAuditedAggregateRoot, IMultiTenant, IMultiStore + public class Refund : FullAuditedAggregateRoot, IMultiTenant, IMultiStore { public virtual Guid? TenantId { get; protected set; } @@ -15,7 +15,7 @@ namespace EasyAbp.EShop.Payments.RefundRecords public virtual Guid OrderId { get; protected set; } [NotNull] - public virtual string RefundMethod { get; protected set; } + public virtual string RefundPaymentMethod { get; protected set; } [NotNull] public virtual string ExternalTradingCode { get; protected set; }