Compare commits
2 Commits
82876de785
...
9777d3dd53
| Author | SHA1 | Date |
|---|---|---|
|
|
9777d3dd53 | |
|
|
191119c427 |
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public class ProductToAuctionDto : IProductToAuctionDto
|
|||
public int ProductId { get; set; }
|
||||
public int AuctionId { get; set; }
|
||||
public int WinnerCustomerId { get; set; }
|
||||
|
||||
public AuctionStatus AuctionStatus { get; set; }
|
||||
public decimal StartingPrice { get; set; }
|
||||
public decimal CurrentPrice { get; set; }
|
||||
|
|
@ -22,14 +23,20 @@ public class ProductToAuctionDto : IProductToAuctionDto
|
|||
/// EGYELŐRE NE HASZNÁLD!!! - J.
|
||||
/// </summary>
|
||||
public decimal StepAmount { get; set; }
|
||||
|
||||
public List<AuctionBidDto> AuctionBidDtos { get; } = [];
|
||||
|
||||
public bool IsActiveItem => AuctionStatus is AuctionStatus.Active or AuctionStatus.FirstWarning or AuctionStatus.SecondWarning;
|
||||
|
||||
public decimal BidPrice { get; set; }
|
||||
|
||||
public ProductToAuctionDto() { }
|
||||
public ProductToAuctionDto(ProductToAuctionMapping productToAuction) : this(productToAuction, 0/*AuctionService.GetStepAmount(productToAuction.BidPrice)*/) { }
|
||||
public ProductToAuctionDto()
|
||||
{
|
||||
}
|
||||
|
||||
public ProductToAuctionDto(ProductToAuctionMapping productToAuction) : this(productToAuction, 0 /*AuctionService.GetStepAmount(productToAuction.BidPrice)*/)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
|
@ -42,7 +49,7 @@ public class ProductToAuctionDto : IProductToAuctionDto
|
|||
|
||||
if (stepAmount > 0) StepAmount = stepAmount;
|
||||
//else StepAmount = AuctionService.GetStepAmount(productToAuction.BidPrice);
|
||||
|
||||
|
||||
|
||||
Id = productToAuction.Id;
|
||||
ProductId = productToAuction.ProductId;
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ public partial class ProductToAuctionMapping : MgEntityBase, IProductToAuctionMa
|
|||
public int OrderId { get; set; }
|
||||
public Guid? OrderGuid { get; set; }
|
||||
public int WinnerCustomerId { get; set; }
|
||||
public int? BiddingNumber { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
[NotColumn]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -255,7 +256,9 @@ public class AuctionService(
|
|||
CustomerId = productToAuction.WinnerCustomerId,
|
||||
OrderTotal = productToAuction.CurrentPrice,
|
||||
};
|
||||
processPaymentRequest.CustomValues.Add("ProductToAuctionMappingId", productToAuction.Id);
|
||||
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);
|
||||
product.DisableBuyButton = false; //TODO: ezt automatikusan kéne false-ra állítani, mikor Assign-oljuk a ProductToAuctionItem-hez! vagy valami hasonló... - J.
|
||||
|
|
|
|||
Loading…
Reference in New Issue