Subversion Repositories SmartDukaan

Rev

Rev 37143 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.cart;

import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
import com.spice.profitmandi.dao.entity.user.CartLine;
import com.spice.profitmandi.dao.model.CarryBagQuote;
import com.spice.profitmandi.dao.model.CartItem;
import com.spice.profitmandi.dao.model.CartResponse;
import com.spice.profitmandi.dao.model.UserCart;
import com.spice.profitmandi.service.inventory.FocusedShortageModel;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public interface CartService {
        CartModel addToCart(int cartId, int itemId, int quantity, float sellingPrice);

        boolean clearCart(int cartId) throws ProfitMandiBusinessException;

        CartModel removeFromCart(int cartId, int itemId);

        CartModel getCart(int cartId);

        CartResponse getCartValidation(int cartId) throws ProfitMandiBusinessException;

        void addItemsToCart(int cartId, List<CartItem> cartItems) throws ProfitMandiBusinessException;

        void addItemsToCart(int cartId, int fofoId, List<CartItem> cartItems) throws ProfitMandiBusinessException;

        void addAddressToCart(int cartId, long addressId) throws ProfitMandiBusinessException;

        /** How the carry bags among these item quantities are charged - see CarryBagQuote. */
        CarryBagQuote getCarryBagQuote(int fofoId, Map<Integer, Integer> itemQty) throws ProfitMandiBusinessException;

        /** The cart lines to raise orders from: the carry bag line split into its flat priced and listing priced parts. */
        List<CartLine> splitCarryBagLine(int fofoId, List<CartLine> cartLines) throws ProfitMandiBusinessException;

        List<FocusedShortageModel> focusedModelShortageValidation(int fofoId, Map<Integer, Integer> catalogCartQtyMap)
                        throws ProfitMandiBusinessException;

        List<FocusedShortageModel> focusedModelShortageValidation(int fofoId, Map<Integer, Integer> catalogCartQtyMap,
                        Map<Integer, Long> inStockItemModel, Map<Integer, Long> itempendingIndent,
                        Map<Integer, Long> grnItemPendingOrders, FofoStore fofoStore,
                        List<String> retailerBlockBrands, Map<Integer, Integer> focusedModelMap)
                        throws ProfitMandiBusinessException;

    UserCart setCartItems(int fofoId, List<CartItem> cartItems) throws ProfitMandiBusinessException;
}