EasyAbp/EShop

Roll back inventory after order cancellation

gdlcf88 opened this issue · 0 comments

When an order is being canceled:

  1. If the InventoryStrategy is ReduceAfterPayment
    1. If the order is NOT paid -> No need to roll back inventory.
    2. If the order is paid -> Do not roll back inventory. Cancellers (admins) can roll it back manually if necessary.
  2. If the InventoryStrategy is ReduceAfterPlacing
    1. If the order is NOT paid -> Do roll back inventory.
    2. If the order is paid -> Do not roll back inventory. Cancellers (admins) can roll it back manually if necessary.

Should create an InventoryRollbackOrderCanceledEventHandler class to handle the OrderCanceledEto event. It will try to roll back the inventory after the order is canceled.