diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs index 1927d372..557874a9 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs @@ -1,29 +1,26 @@ using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; using EasyAbp.EShop.Products.Products; using Volo.Abp.Application.Dtos; -using Volo.Abp.Data; namespace EasyAbp.EShop.Orders.Orders.Dtos { [Serializable] - public class OrderLineDto : FullAuditedEntityDto, IOrderLine + public class OrderLineDto : ExtensibleFullAuditedEntityDto, IOrderLine { public Guid ProductId { get; set; } - + public Guid ProductSkuId { get; set; } - + public Guid? ProductDetailId { get; set; } public DateTime ProductModificationTime { get; set; } - + public DateTime? ProductDetailModificationTime { get; set; } - + public string ProductGroupName { get; set; } - + public string ProductGroupDisplayName { get; set; } - + public string ProductUniqueName { get; set; } public string ProductDisplayName { get; set; } @@ -31,28 +28,25 @@ namespace EasyAbp.EShop.Orders.Orders.Dtos public InventoryStrategy? ProductInventoryStrategy { get; set; } public string SkuName { get; set; } - + public string SkuDescription { get; set; } - + public string MediaResources { get; set; } - + public string Currency { get; set; } - + public decimal UnitPrice { get; set; } - + public decimal TotalPrice { get; set; } - + public decimal TotalDiscount { get; set; } - + public decimal ActualTotalPrice { get; set; } public int Quantity { get; set; } - + public int RefundedQuantity { get; set; } - + public decimal RefundAmount { get; set; } - - [JsonInclude] - public ExtraPropertyDictionary ExtraProperties { get; set; } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs index e8b84996..34b7a033 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs @@ -1,9 +1,9 @@ using System; -using System.Text.Json.Serialization; using EasyAbp.EShop.Products.Products; using JetBrains.Annotations; using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.DynamicProxy; namespace EasyAbp.EShop.Orders.Orders { @@ -59,13 +59,12 @@ namespace EasyAbp.EShop.Orders.Orders public virtual decimal RefundAmount { get; protected set; } - [JsonInclude] - public virtual ExtraPropertyDictionary ExtraProperties { get; protected set; } + public ExtraPropertyDictionary ExtraProperties { get; protected set; } protected OrderLine() { ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } public OrderLine( @@ -114,7 +113,7 @@ namespace EasyAbp.EShop.Orders.Orders RefundAmount = 0; ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } internal void Refund(int quantity, decimal amount) diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs index 2b46a38e..bdbd08d5 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs @@ -1,11 +1,10 @@ using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; using EasyAbp.EShop.Stores.Stores; using EasyAbp.PaymentService.Payments; using JetBrains.Annotations; using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.DynamicProxy; namespace EasyAbp.EShop.Payments.Payments { @@ -15,36 +14,34 @@ namespace EasyAbp.EShop.Payments.Payments [NotNull] public virtual string ItemType { get; protected set; } - + public virtual string ItemKey { get; protected set; } public virtual decimal OriginalPaymentAmount { get; protected set; } public virtual decimal PaymentDiscount { get; protected set; } - + public virtual decimal ActualPaymentAmount { get; protected set; } - + public virtual decimal RefundAmount { get; protected set; } - + public virtual decimal PendingRefundAmount { get; protected set; } - - [JsonInclude] - public virtual ExtraPropertyDictionary ExtraProperties { get; protected set; } + + public ExtraPropertyDictionary ExtraProperties { get; protected set; } #endregion - + public virtual Guid StoreId { get; protected set; } public void SetStoreId(Guid storeId) { StoreId = storeId; } - + protected PaymentItem() { ExtraProperties = new ExtraPropertyDictionary(); - - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } } -} +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs index 43e71126..bee14c4d 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using System.Text.Json.Serialization; using EasyAbp.EShop.Stores.Stores; using EasyAbp.PaymentService.Refunds; using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.DynamicProxy; namespace EasyAbp.EShop.Payments.Refunds { @@ -13,41 +13,39 @@ namespace EasyAbp.EShop.Payments.Refunds #region Base properties public virtual Guid PaymentItemId { get; protected set; } - + public virtual decimal RefundAmount { get; protected set; } - + public virtual string CustomerRemark { get; protected set; } - + public virtual string StaffRemark { get; protected set; } - [JsonInclude] public virtual ExtraPropertyDictionary ExtraProperties { get; set; } #endregion - + public virtual Guid StoreId { get; protected set; } - + public virtual Guid OrderId { get; protected set; } - + public virtual List OrderLines { get; protected set; } - + public virtual List OrderExtraFees { get; protected set; } protected RefundItem() { OrderLines = new List(); OrderExtraFees = new List(); - + ExtraProperties = new ExtraPropertyDictionary(); - - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } - + public void SetStoreId(Guid storeId) { StoreId = storeId; } - + public void SetOrderId(Guid orderId) { OrderId = orderId; diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs index cf3d9402..79e2c249 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using System.Text.Json.Serialization; using JetBrains.Annotations; using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.DynamicProxy; namespace EasyAbp.EShop.Products.Products { @@ -16,16 +16,15 @@ namespace EasyAbp.EShop.Products.Products public virtual string Description { get; protected set; } public virtual int DisplayOrder { get; protected set; } - - [JsonInclude] - public virtual ExtraPropertyDictionary ExtraProperties { get; protected set; } + + public ExtraPropertyDictionary ExtraProperties { get; protected set; } public virtual List ProductAttributeOptions { get; protected set; } protected ProductAttribute() { ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } public ProductAttribute( @@ -41,7 +40,7 @@ namespace EasyAbp.EShop.Products.Products ProductAttributeOptions = new List(); ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs index d3a55fea..e355d986 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs @@ -1,9 +1,8 @@ using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; using JetBrains.Annotations; using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.DynamicProxy; namespace EasyAbp.EShop.Products.Products { @@ -17,13 +16,12 @@ namespace EasyAbp.EShop.Products.Products public virtual int DisplayOrder { get; protected set; } - [JsonInclude] - public virtual ExtraPropertyDictionary ExtraProperties { get; protected set; } + public ExtraPropertyDictionary ExtraProperties { get; protected set; } protected ProductAttributeOption() { ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } public ProductAttributeOption( @@ -37,7 +35,7 @@ namespace EasyAbp.EShop.Products.Products DisplayOrder = displayOrder; ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs index efe06138..7d2e5379 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs @@ -1,10 +1,10 @@ using System; -using System.Text.Json.Serialization; using JetBrains.Annotations; using NodaMoney; using Volo.Abp; using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.DynamicProxy; namespace EasyAbp.EShop.Products.Products { @@ -16,6 +16,9 @@ namespace EasyAbp.EShop.Products.Products [CanBeNull] public virtual string Name { get; protected set; } + [CanBeNull] + public virtual string Description { get; protected set; } + [NotNull] public virtual string Currency { get; protected set; } @@ -34,13 +37,12 @@ namespace EasyAbp.EShop.Products.Products public virtual Guid? ProductDetailId { get; protected set; } - [JsonInclude] - public virtual ExtraPropertyDictionary ExtraProperties { get; protected set; } + public ExtraPropertyDictionary ExtraProperties { get; protected set; } protected ProductSku() { ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } public ProductSku( @@ -72,7 +74,7 @@ namespace EasyAbp.EShop.Products.Products ProductDetailId = productDetailId; ExtraProperties = new ExtraPropertyDictionary(); - this.SetDefaultsForExtraProperties(); + this.SetDefaultsForExtraProperties(ProxyHelper.UnProxy(this).GetType()); } internal void TrimName() diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/Authorization/BookingPaymentCreationAuthorizationHandlersTests.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/Authorization/BookingPaymentCreationAuthorizationHandlersTests.cs index 11c9bc17..8f207c78 100644 --- a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/Authorization/BookingPaymentCreationAuthorizationHandlersTests.cs +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/Authorization/BookingPaymentCreationAuthorizationHandlersTests.cs @@ -37,7 +37,6 @@ public class BookingPaymentCreationAuthorizationHandlersTests : BookingApplicati ProductId = BookingTestConsts.BookingProduct1Id, ProductSkuId = BookingTestConsts.BookingProduct1Sku1Id, Quantity = BookingTestConsts.Volume, - ExtraProperties = new ExtraPropertyDictionary() }; orderLine1.SetProperty(BookingOrderProperties.OrderLineBookingPeriodSchemeId, @@ -55,7 +54,6 @@ public class BookingPaymentCreationAuthorizationHandlersTests : BookingApplicati ProductId = BookingTestConsts.BookingProduct1Id, ProductSkuId = BookingTestConsts.BookingProduct1Sku1Id, Quantity = BookingTestConsts.Volume, - ExtraProperties = new ExtraPropertyDictionary() }; orderLine2.SetProperty(BookingOrderProperties.OrderLineBookingPeriodSchemeId,