package cn.ysk.cashier.service;

import cn.ysk.cashier.dto.ShopSummaryDto;
import cn.ysk.cashier.dto.shop.ShopTableSaleInfoDto;
import cn.ysk.cashier.vo.ShopTableSaleInfoVo;
import cn.ysk.cashier.vo.SummaryVO;
import cn.ysk.cashier.vo.TbOrderPayCountVo;
import org.springframework.data.domain.Page;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author lyf
 */
public interface SummaryService {
    SummaryVO selectSummary(Integer shop);

    Map<String,Object> selectSummaryDate(Integer shopId, Integer day);

    Map<String,Object> selectSummaryToday(Integer shopId);

    Map<String,Object> selectSummaryAmount(Integer shopId, Integer day);
    Map<String,Object> selectSummaryProduct(Integer shopId, Integer day,Integer page,Integer size);

    Map<String,Object> selectSummaryPayType(Integer shopId, Integer day);

    <T> Page<T>  selectSummaryByDay(ShopSummaryDto summaryDto, Integer page, Integer size);

    /**
     * 导出数据
     * @param response /
     * @throws IOException /
     */
    void download(ShopSummaryDto summaryDto, HttpServletResponse response) throws IOException;

    List<TbOrderPayCountVo> summaryCount(ShopSummaryDto summaryDto);

    List<ShopTableSaleInfoVo> selectSummaryTable(Integer shopId, Date startTime, Date endTime);

    void downloadTableSaleInfo(ShopTableSaleInfoDto shopTableSaleInfoDto, HttpServletResponse response) throws IOException;
}
