package com.m2pool.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.m2pool.common.datasource.annotation.DistributionDB;
import com.m2pool.common.datasource.annotation.HashRateDB;
import com.m2pool.manage.dto.*;
import com.m2pool.manage.entity.ManageBroadcast;
import com.m2pool.manage.entity.ManageWalletOutIn;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Mapper
public interface ManageWalletOutInMapper extends BaseMapper<ManageWalletOutIn> {


    /**
     * 获取入账信息
     * @param startDate
     * @return
     */
    @DistributionDB
    List<ManageWalletOutIn> getWalletIn(@Param("startDate") LocalDateTime startDate);


    /**
     * 获取出账信息
     * @param startDate
     * @return
     */
    @DistributionDB
    List<ManageWalletOutIn> getWalletOut(@Param("startDate") LocalDateTime startDate);

    /**
     * 获取用户待支付汇总
     * @return
     */
    @DistributionDB
    List<SummaryOfPendingPaymentsDto> summaryOfPendingPayments();


    /**
     * 获取最大date_out
     * @return
     */
    LocalDateTime getMaxDateIn();
}
