package com.ruoyi.web.modules.cart.facade.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.modules.cart.facade.ICartFacade;
import com.ruoyi.web.modules.cart.mapper.CartAppMapper;

/**
 * 购物车 Facade 实现
 */
@Service
public class CartFacadeImpl implements ICartFacade
{
    @Autowired
    private CartAppMapper cartAppMapper;

    @Override
    public void removeItems(Long memberId, List<Long> cartItemIds)
    {
        if (memberId == null || cartItemIds == null || cartItemIds.isEmpty())
        {
            return;
        }
        cartAppMapper.deleteByIdsAndMember(memberId, cartItemIds);
    }
}
