Class OrderService

java.lang.Object
com.mt.ecommerce.product.service.OrderService

@Service public class OrderService extends Object
Service class for managing orders. Provides methods for adding, editing, and retrieving orders.
  • Constructor Details

  • Method Details

    • addOrder

      public void addOrder(OrderBO orderBO, UUID vendorId, String userId)
      Adds a new order.
      Parameters:
      orderBO - the order information to add
      vendorId - the ID of the vendor associated with the order
      userId - the ID of the user placing the order
    • editOrderStatus

      public void editOrderStatus(UUID uuid, OrderStatus status)
      Edits the status of an existing order.
      Parameters:
      uuid - the ID of the order to edit
      status - the new status for the order
    • getAllOrder

      public List<OrderBO> getAllOrder(UUID vendorId, int pageNo, int size)
      Retrieves all orders for a specific vendor with pagination.
      Parameters:
      vendorId - the ID of the vendor whose orders are to be retrieved
      pageNo - the page number for pagination
      size - the number of records per page
      Returns:
      a list of OrderBO objects representing the vendor's orders
    • getAllOrderByUserId

      public List<OrderBO> getAllOrderByUserId(String userId, int pageNo, int size)
      Retrieves all orders for a specific user with pagination.
      Parameters:
      userId - the ID of the user whose orders are to be retrieved
      pageNo - the page number for pagination
      size - the number of records per page
      Returns:
      a list of OrderBO objects representing the user's orders