package com.ruoyi.web.modules.trading.mapper;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.trading.domain.dto.AppSupplierAmountBucketDto;
import com.ruoyi.web.modules.trading.domain.dto.AppSupplierSettlementSummaryDto;
import com.ruoyi.web.modules.trading.domain.dto.AppSupplierTradeSummaryDto;

/**
 * 供应商小程序首页统计 Mapper。
 */
public interface AppSupplierHomeMapper
{
    AppSupplierTradeSummaryDto selectTradeSummary(
            @Param("supplierId") Long supplierId,
            @Param("rangeStart") Date rangeStart,
            @Param("rangeEnd") Date rangeEnd);

    AppSupplierSettlementSummaryDto selectSettlementSummary(
            @Param("supplierId") Long supplierId,
            @Param("rangeStart") Date rangeStart,
            @Param("rangeEnd") Date rangeEnd);

    List<AppSupplierAmountBucketDto> selectHourlyAmountTrend(
            @Param("supplierId") Long supplierId,
            @Param("rangeStart") Date rangeStart,
            @Param("rangeEnd") Date rangeEnd);

    List<AppSupplierAmountBucketDto> selectDailyAmountTrend(
            @Param("supplierId") Long supplierId,
            @Param("rangeStart") Date rangeStart,
            @Param("rangeEnd") Date rangeEnd);

    Long selectTodayTradedHeads(
            @Param("supplierId") Long supplierId,
            @Param("dayStart") Date dayStart,
            @Param("dayEnd") Date dayEnd);

    Long selectPendingPayHeads(@Param("supplierId") Long supplierId);

    Long countTodayEntryEarTags(
            @Param("supplierId") Long supplierId,
            @Param("dayStart") Date dayStart,
            @Param("dayEnd") Date dayEnd);

    List<String> selectActiveIsolationEarTagRows(@Param("supplierId") Long supplierId);

    List<String> selectSickDeadEarTagRowsBySupplier(@Param("supplierId") Long supplierId);
}
