package com.izouma.dingdong.repo.user;

import com.izouma.dingdong.domain.user.ShoppingCart;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface ShoppingCartRepo extends JpaRepository<ShoppingCart, Long>, JpaSpecificationExecutor<ShoppingCart> {

    //按用户和商户查找
    ShoppingCart findByUserIdAndMerchantId(Long userId, Long merchantId);

    List<ShoppingCart> findAllByUserId(Long userId);
}