package com.yunzhi.marketing.redpack.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yunzhi.marketing.excel.redPacket.RedPacketRankingListExport;
import com.yunzhi.marketing.redpack.entity.TaRedPacketPerson;
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 TaRedPacketPersonMapper extends BaseMapper<TaRedPacketPerson> {

    /**
     * 获取红包活动排行榜
     *
     * @param page
     * @param activityId
     * @param orgId
     * @param phone
     * @return
     */
    IPage<TaRedPacketPerson> getRedPacketRankingList(IPage<TaRedPacketPerson> page,
                                                     @Param("activityId") String activityId,
                                                     @Param("orgId") Integer orgId,
                                                     @Param("phone") String phone);

    /**
     * 导出红包活动排行榜
     *
     * @param activityId
     * @param orgId
     * @param phone
     * @return
     */
    List<RedPacketRankingListExport> exportRedPacketRankingList(@Param("activityId") String activityId,
                                                                @Param("orgId") Integer orgId,
                                                                @Param("phone") String phone);


}
