package com.heyu.api.data.dao.vv;
/**
 * <p>
 * 购物车 服务类
 * </p>
 *
 * @author quyixiao
 * @since 2025-08-23
 */

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heyu.api.data.entity.vv.VvShoppingCartEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.mybatis.plugin.annotations.IF;
import com.lz.mybatis.plugin.annotations.IN;
import com.lz.mybatis.plugin.annotations.LIKE;
import com.lz.mybatis.plugin.annotations.OrderBy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VvShoppingCartDao extends BaseMapper<VvShoppingCartEntity> {


    VvShoppingCartEntity selectVvShoppingCartById(@Param("id") Long id);


    Long insertVvShoppingCart(VvShoppingCartEntity vvShoppingCart);


    Long insertOrUpdateVvShoppingCart(VvShoppingCartEntity vvShoppingCart);


    int updateVvShoppingCartById(VvShoppingCartEntity vvShoppingCart);


    int updateCoverVvShoppingCartById(VvShoppingCartEntity vvShoppingCart);


    int deleteVvShoppingCartById(@Param("id") Long id);


    @OrderBy(VvShoppingCartEntity.id_)
    List<VvShoppingCartEntity> selectByCondition(IPage page,
                                                 @IF @LIKE String productName,
                                                 @IF @LIKE String buyerPhone,
                                                 @IF @LIKE String buyerName,
                                                 @IF @LIKE String buyerWeixin);


    @OrderBy(VvShoppingCartEntity.id_)
    List<VvShoppingCartEntity> selectAppByCondition(IPage page,
                                                    @IF String productName,
                                                    Long buyerId
    );



    Integer deleteVvShoppingCartByIds(@IN List<Long> id);
}