package com.wzj.soopin.statistics.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wzj.soopin.order.domain.entity.Aftersale;
import com.wzj.soopin.order.domain.vo.PageVO;
import com.wzj.soopin.statistics.entity.dto.StatisticsQueryParam;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * 售后统计业务层
 *
 * @author Bulbasaur
 * @since 2020/12/9 19:04
 */
public interface AfterSaleStatisticsService extends IService<Aftersale> {

    /**
     * 获取待处理售后数量
     *
     * @param serviceType 售后类型
     * @return 待处理售后数量
     */
    long applyNum(String serviceType);

    /**
     * 获取售后统计
     *
     * @param statisticsQueryParam 统计查询参数
     * @param pageVO              分页参数
     * @return 售后统计分页
     */
    IPage<Aftersale> getStatistics(StatisticsQueryParam statisticsQueryParam, PageVO pageVO);

    /**
     * 导出售后统计
     *
     * @param statisticsQueryParam 统计查询参数
     * @param response            HTTP响应对象
     * @throws IOException IO异常
     */
    void exportRefund(StatisticsQueryParam statisticsQueryParam, HttpServletResponse response) throws IOException;
}
