package com.cyksj.service.mange.statistics;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cyksj.dto.Result;
import com.cyksj.model.excel.ExcelAccountData;
import com.cyksj.model.excel.ExcelSheetAndData;
import com.cyksj.model.views.BackgroundDataView;
import com.cyksj.model.views.ExpiredAccountDataView;
import com.cyksj.model.views.GroupsDataStatisticsView;

import java.util.Date;
import java.util.List;

/*
 *项目名: netflix
 *文件名: StatisticsService
 *创建者: JavaZou
 *创建时间:2022/10/17 14:43
 */
public interface StatisticsDataService {
	Result<BackgroundDataView> getStatisticsByCondition(Integer type, Long startTime, Long endTime) throws InterruptedException;

	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer uid, Long startTime, Long endTime, Long start, Long limit);

	Result<String> updateRenewStatus(Long relationId);

	Result<String> updateHandleStatus(Long relationId);

	List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime);

	BackgroundDataView getTitleData();

	//分销金额数据统计
	void distribute(BackgroundDataView backgroundDataView, Date startDate, Date endDate);

	/**
	 * 数据导出
	 */
	List<ExcelSheetAndData> exportStatisticsDataByType(Integer type, Long startTime, Long endTime);

	/**
	 * 每月业务数据导出
	 */
	List<ExcelSheetAndData> exportMonthlyData(Long startTime, Long endTime);

	Result<BackgroundDataView> getStatisticsHeader(Long startTime, Long endTime);

	void yhShopDistribute(BackgroundDataView backgroundDataView, Date startDate, Date endDate);

	GroupsDataStatisticsView getGroupsData(Long startTime, Long endTime, Integer type, Boolean isDistribute) throws Exception;

	void userMirrorShopDistribute(BackgroundDataView backgroundDataView, Date startDate, Date endDate);
}
