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.VvPromoterAwardLineEntity;
import com.lz.mybatis.plugin.annotations.Column;
import com.lz.mybatis.plugin.annotations.IF;
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 VvPromoterAwardLineDao extends BaseMapper<VvPromoterAwardLineEntity> {


	VvPromoterAwardLineEntity selectVvPromoterAwardLineById(@Param("id")Long id);


	Long insertVvPromoterAwardLine(VvPromoterAwardLineEntity vvPromoterAwardLine);


	Long insertOrUpdateVvPromoterAwardLine(VvPromoterAwardLineEntity vvPromoterAwardLine);


	int updateVvPromoterAwardLineById(VvPromoterAwardLineEntity vvPromoterAwardLine);


	int updateCoverVvPromoterAwardLineById(VvPromoterAwardLineEntity vvPromoterAwardLine);


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



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





    @OrderBy(VvPromoterAwardLineEntity.id_)
    List<VvPromoterAwardLineEntity> selectByAppCondition(IPage page,
                                                      @IF Long promoterBuyerId,
                                                      @IF @Column(VvPromoterAwardLineEntity.create_timestamp) Long minCreateTimestamp,
                                                      @IF @Column(VvPromoterAwardLineEntity.create_timestamp) Long maxCreateTimestamp,
                                                      @OrderBy @IF @Column(VvPromoterAwardLineEntity.create_timestamp) String createTimestampSort);
}