package com.ruoyi.frequency.mallshoppingcar.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.controller.resp.ShoppingCarListVo;
import com.ruoyi.frequency.mallshoppingcar.entity.MallShoppingCar;
import com.ruoyi.vo.UserVo;
import org.apache.ibatis.annotations.Param;

/**
 * 购物车Mapper接口
 *
 * @author liwenlong
 * @date 2024-01-25
 */
public interface MallShoppingCarMapper  extends BaseMapper<MallShoppingCar>
{
    /**
     * 查询购物车
     *
     * @param id 购物车主键
     * @return 购物车
     */
    public MallShoppingCar selectMallShoppingCarById(Long id);

    /**
     * 查询购物车列表
     *
     * @param mallShoppingCar 购物车
     * @return 购物车集合
     */
    public List<MallShoppingCar> selectMallShoppingCarList(MallShoppingCar mallShoppingCar);

    /**
     * 新增购物车
     *
     * @param mallShoppingCar 购物车
     * @return 结果
     */
    public int insertMallShoppingCar(MallShoppingCar mallShoppingCar);

    /**
     * 修改购物车
     *
     * @param mallShoppingCar 购物车
     * @return 结果
     */
    public int updateMallShoppingCar(MallShoppingCar mallShoppingCar);

    List<ShoppingCarListVo> shoppingCarList(@Param("userVo") UserVo userVo, @Param("list") List<Long> shoppingCardIdList);
}
