package com.hzs.bonus.bonus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.bonus.CuMemberBonusPush;
import com.hzs.common.domain.member.ext.CuMemberBonusPushExt;
import com.hzs.bonus.bonus.param.BonusParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 会员奖金-直推收益明细表 Mapper 接口
 */
public interface CuMemberBonusPushMapper extends BaseMapper<CuMemberBonusPush> {

    /**
     * 根据查询条件查询固定的奖金明细
     *
     * @param bonusParam 查询条件
     */
    List<CuMemberBonusPushExt> queryMemberBonusPushByBonusItems(BonusParam bonusParam);

    /**
     * 根据查询条件查询固定的奖金明细
     *
     * @param bonusParam 查询条件
     */
    List<CuMemberBonusPushExt> queryMemberBonusPushByBonusItemsFoServer(@Param("bonusParam") BonusParam bonusParam);

    /**
     * 删除会员奖金汇总表
     *
     * @param period 结算期间
     */
    void deleteCuMemberBonusPush(Integer period);

    /**
     * 批量插入会员直推奖
     *
     * @param cuMemberBonusPushList 会员奖金
     */
    void batchInsertCuMemberBonusPush(@Param("cuMemberBonusPushList") List<?> cuMemberBonusPushList);

    /**
     * 插入会员直推奖
     *
     * @param cuMemberBonusPush 直推奖金
     */
    void insertCuMemberBonusPush(@Param("item") CuMemberBonusPush cuMemberBonusPush);

}
