package org.jeecg.modules.oroqen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.oroqen.entity.OroqenCart;

import java.util.List;

/**
 * @Description: 购物车
 * @Author: jeecg-boot
 * @Date: 2025-01-08
 * @Version: V1.0
 */
public interface OroqenCartMapper extends BaseMapper<OroqenCart> {

    /**
     * 根据用户ID查询购物车
     */
    List<OroqenCart> selectByUserId(@Param("userId") String userId);

    /**
     * 根据用户ID和商品ID查询购物车项
     */
    OroqenCart selectByUserIdAndProductId(@Param("userId") String userId, @Param("productId") String productId);
}