This commit is contained in:
Loretta 2024-11-29 07:12:08 +01:00
parent 191119c427
commit 9777d3dd53
5 changed files with 7 additions and 5 deletions

View File

@ -9,6 +9,7 @@ public interface IProductToAuctionDtoBase : IMgModelDtoBase
public int AuctionId { get; set; }
public int WinnerCustomerId { get; set; }
public AuctionStatus AuctionStatus { get; set; }
public decimal StartingPrice { get; set; }
@ -17,5 +18,4 @@ public interface IProductToAuctionDtoBase : IMgModelDtoBase
public int ProductAmount { get; set; }
public int SortIndex { get; set; }
public string BiddingNumber { get; set; }
}

View File

@ -12,7 +12,7 @@ public class ProductToAuctionDto : IProductToAuctionDto
public int ProductId { get; set; }
public int AuctionId { get; set; }
public int WinnerCustomerId { get; set; }
public string BiddingNumber { get; set; }
public AuctionStatus AuctionStatus { get; set; }
public decimal StartingPrice { get; set; }
public decimal CurrentPrice { get; set; }
@ -60,7 +60,6 @@ public class ProductToAuctionDto : IProductToAuctionDto
ProductAmount = productToAuction.ProductAmount;
SortIndex = productToAuction.SortIndex;
WinnerCustomerId = productToAuction.WinnerCustomerId;
BiddingNumber = productToAuction.BiddingNumber;
}
public ProductToAuctionMapping CreateMainEntity()
@ -76,7 +75,6 @@ public class ProductToAuctionDto : IProductToAuctionDto
mainEntity.ProductAmount = ProductAmount;
mainEntity.SortIndex = SortIndex;
mainEntity.WinnerCustomerId = WinnerCustomerId;
mainEntity.BiddingNumber = BiddingNumber;
return mainEntity;
}

View File

@ -5,6 +5,8 @@ namespace Nop.Plugin.Misc.AuctionPlugin.Domains.Entities.Interfaces;
public interface IProductToAuctionMapping : IProductToAuctionDtoBase, ITimeStampInfo //, ISoftRemoveEntityInt
{
public int? BiddingNumber { get; set; }
public int OrderId { get; set; }
public Guid? OrderGuid { get; set; }
}

View File

@ -17,7 +17,7 @@ public partial class ProductToAuctionMapping : MgEntityBase, IProductToAuctionMa
public int OrderId { get; set; }
public Guid? OrderGuid { get; set; }
public int WinnerCustomerId { get; set; }
public string BiddingNumber { get; set; }
public int? BiddingNumber { get; set; }
[NotMapped]
[NotColumn]

View File

@ -15,6 +15,7 @@ using Nop.Core.Domain.Common;
using Nop.Services.Common;
using Nop.Services.Customers;
using Nop.Services.Shipping;
using NUglify.Helpers;
namespace Nop.Plugin.Misc.AuctionPlugin.Services;
@ -256,6 +257,7 @@ public class AuctionService(
OrderTotal = productToAuction.CurrentPrice,
};
processPaymentRequest.CustomValues.Add("TÉTEL: ", $"#{productToAuction.SortIndex}");
if (productToAuction.BiddingNumber != null) processPaymentRequest.CustomValues.Add("BIDNUM", $"#{productToAuction.BiddingNumber}");
processPaymentRequest.CustomValues.Add("PTAID", $"#{productToAuction.Id}");
var product = await productService.GetProductByIdAsync(productToAuction.ProductId);