package com.heyu.api.data.dao.vv;
/**
 * <p>
 * 买家地址 服务类
 * </p>
 *
 * @author quyixiao
 * @since 2025-08-23
 */

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heyu.api.data.entity.vv.VvBuyerAddressEntity;
import com.lz.mybatis.plugin.annotations.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VvBuyerAddressDao extends BaseMapper<VvBuyerAddressEntity> {


    VvBuyerAddressEntity selectVvBuyerAddressById(@Param("id") Long id);


    Long insertVvBuyerAddress(VvBuyerAddressEntity vvBuyerAddress);


    Long insertOrUpdateVvBuyerAddress(VvBuyerAddressEntity vvBuyerAddress);


    int updateVvBuyerAddressById(VvBuyerAddressEntity vvBuyerAddress);


    int updateCoverVvBuyerAddressById(VvBuyerAddressEntity vvBuyerAddress);


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


    @OrderByIdDesc
    List<VvBuyerAddressEntity> selectAppByCondition(IPage page, Long buyerId,@NE String status);



    List<VvBuyerAddressEntity> selectMapByBuyerIds(List<Long> buyerId);


    int updateVvBuyerAddressStatusById(@Column(VvBuyerAddressEntity.status_) String status,
                                       @IF @By @Column(VvBuyerAddressEntity.status_) String status1,
                                       @By@Column(VvBuyerAddressEntity.buyer_id) Long buyerId);


    int updateVvBuyerAddressStatusByBuyerId(@Column(VvBuyerAddressEntity.status_) String status,
                                       @By@Column(VvBuyerAddressEntity.buyer_id) Long buyerId);
}