package com.heyu.api.data.dao.vv;
/**
 * <p>
 * 推广者 服务类
 * </p>
 *
 * @author quyixiao
 * @since 2025-11-21
 */

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heyu.api.data.entity.vv.VvPromoterBuyerEntity;
import com.lz.mybatis.plugin.annotations.Column;
import com.lz.mybatis.plugin.annotations.IF;
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 VvPromoterBuyerDao extends BaseMapper<VvPromoterBuyerEntity> {


    VvPromoterBuyerEntity selectVvPromoterBuyerById(@Param("id") Long id);



    Long insertVvPromoterBuyer(VvPromoterBuyerEntity vvPromoterBuyer);


    Long insertOrUpdateVvPromoterBuyer(VvPromoterBuyerEntity vvPromoterBuyer);


    int updateVvPromoterBuyerById(VvPromoterBuyerEntity vvPromoterBuyer);


    int updateCoverVvPromoterBuyerById(VvPromoterBuyerEntity vvPromoterBuyer);


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



    @OrderBy(VvPromoterBuyerEntity.id_)
    List<VvPromoterBuyerEntity> selectBuyerByCondition(IPage page,
                                                       @IF String promoterId,
                                                       @IF Long promoterBuyerId,
                                                       @IF String promoterBuyerName,
                                                       @IF String promoterBuyerWeixin,
                                                       @IF String promoterBuyerPhone,
                                                       @IF @Column(VvPromoterBuyerEntity.create_timestamp) Long minCreateTimestamp,
                                                       @IF @Column(VvPromoterBuyerEntity.create_timestamp) Long maxCreateTimestamp,
                                                       @OrderBy @IF @Column(VvPromoterBuyerEntity.create_timestamp) String createTimestampSort
    );



    List<VvPromoterBuyerEntity> selectVvPromoterBuyerByPromoterId(Long promoterId);



    @OrderBy(VvPromoterBuyerEntity.id_)
    List<VvPromoterBuyerEntity> selectAppByCondition(IPage page,
                                                     Long wasBuyerId,
                                                     @IF @Column(VvPromoterBuyerEntity.create_timestamp) Long minCreateTimestamp,
                                                     @IF @Column(VvPromoterBuyerEntity.create_timestamp) Long maxCreateTimestamp,
                                                     @OrderBy @IF @Column(VvPromoterBuyerEntity.create_timestamp) String createTimestampSort
    );































}