package com.hai.goods.service;

import com.hai.entity.GoodsDetail;
import com.hai.entity.GoodsShoppingCart;

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

/**
 * @serviceName ShoppingCartService.java
 * @author Sum1Dream
 * @version 1.0.0
 * @Description // 购物车业务
 * @createTime 15:06 2023/4/13
 **/
public interface ShoppingCartService {

    /**
     * @Author Sum1Dream
     * @Name insertShoppingCart
     * @Description // 新增购物车
     * @Date 15:08 2023/4/11
     * @Param [shoppingCart]
     * @Return void
     */
    void insertShoppingCart(GoodsShoppingCart shoppingCart);

    /**
     * @Author Sum1Dream
     * @Name updateShoppingCart
     * @Description // 更新购物车
     * @Date 15:14 2023/4/11
     * @Param [shoppingCart]
     * @Return void
     */
    void updateShoppingCart(GoodsShoppingCart shoppingCart);

    /**
     * @Author Sum1Dream
     * @Name getShoppingCartList
     * @Description // 查询购物车列表
     * @Date 15:17 2023/4/11
     * @Param [map]
     * @Return java.util.List<com.hai.entity.GoodsDetail>
     */
    List<GoodsShoppingCart> getShoppingCartList(Map<String , Object> map);


    /**
     * @Author Sum1Dream
     * @Name findGoodsDetailById
     * @Description // 查询详情
     * @Date 16:19 2023/4/11
     * @Param [id]
     * @Return com.hai.entity.GoodsDetail
     */
    GoodsShoppingCart findShoppingCartById(Long id);

    /**
     * @Author Sum1Dream
     * @Name findShoppingCartByMap
     * @Description // 根据map查询购物车
     * @Date 14:20 2023/5/5
     * @Param [map]
     * @Return com.hai.entity.GoodsShoppingCart
     */
    GoodsShoppingCart findShoppingCartByMap(Map<String , Object> map);

    /**
     * @Author Sum1Dream
     * @Name DeleteShoppingCart
     * @Description // 删除购物车
     * @Date 15:09 2023/4/13
     * @Param [id]
     * @Return void
     */
    void deleteShoppingCart(Long id);
}
