package com.huiju.estateagents.redpack.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.huiju.estateagents.redpack.entity.TaRedPacketHistory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 红包助力人员列表  Mapper 接口
 * </p>
 *
 * @author fxf
 * @since 2020-06-03
 */
@Mapper
@Component
public interface TaRedPacketHistoryMapper extends BaseMapper<TaRedPacketHistory> {

    IPage<TaRedPacketHistory> listHistoryByCondition(IPage<TaRedPacketHistory> page,
                                                     @Param("activityId") String activityId);

    /**
     * 获取助力排行榜
     * @param activityId
     * @param orgId
     * @return
     */
    List<TaRedPacketHistory> getRanking(String activityId, Integer orgId ,Integer top);
}
