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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heyu.api.data.entity.vv.VvBuyerEntity;
import com.heyu.api.data.entity.vv.VvPromoterEntity;
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 VvPromoterDao extends BaseMapper<VvPromoterEntity> {


	VvPromoterEntity selectVvPromoterById(@Param("id")Long id);


	Long insertVvPromoter(VvPromoterEntity vvPromoter);


	Long insertOrUpdateVvPromoter(VvPromoterEntity vvPromoter);


	int updateVvPromoterById(VvPromoterEntity vvPromoter);


	int updateCoverVvPromoterById(VvPromoterEntity vvPromoter);


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


    List<VvPromoterEntity> selectVvPromoterByPromoteIds(@IFNullReturnEmpty @IN List<String> promoterId);

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




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



}