package com.ssj.dao.sys.analysis.dao;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.ssj.bean.sys.analysis.bean.Analysis;


public interface AnalysisQueryDao {

	//type=1月份的消费币的总量
	public Long countLibJoinConsumeSumByLibService(String date);
	
	//type=1的总端口数
	public Long countFxMerchantSumByPortNum();
	
	//type=1的月top10
	public List<Map<String,Object>> countFxMerchantSumByTop(String date);
	
	//月机构会员的统计列表
	public Page<Map<String, Object>> countFxMerchantServiceByDate(Map<String, Object> params, Pageable pageable);
	
	public Page<Map<String, Object>> countFxMerchantServiceByVipDate(Map<String, Object> params, Pageable pageable);

	//公用查询方式
	public Page<Map<String, Object>> countFxMerchantCommonByCountDate(Map<String, Object> params, Pageable pageable);
	
	//公用查询明细方式
	public Page<Map<String, Object>> countFxMerchantCommonByVipDate(Map<String, Object> params, Pageable pageable);
	
	public Page<Map<String, Object>> countFxMerchantCommonByUserDate(Map<String, Object> params, Pageable pageable);
	
	//查出时间内的记录
	public Analysis getAnalysisByDay(String libId,String userId,String vipId,Integer source,Integer type,String dayTime);
	
	
	//查出一周内和上周的功能使用总数
	public Map<String, Object> countAnalysisCountCommonByCountDate(Map<String, Object> params);
	
	//召回机构数据（1周不用机构）
	public Map<String, Object> countRecallCommonByCountDate(Map<String, Object> params);
	
	//上传作业的人数
	public Map<String, Object> countUploadWorkCommonByCountDate(Map<String, Object> params);
	
	//返回指定机构的活跃人数
	public Integer countActiveNumCommonByLibCountWeek(Map<String, Object> params);
	
	//返回指定机构的会员人数
	public Integer countMemberNumCommonByLibCountWeek(Map<String, Object> params);
	
	//查出一周内和上周的机构活泼数（账号活跃占比50%以上)
	public Map<String, Object> countAnalysisWeekCountCommonByCountCurDate(Map<String, Object> params);
	
	
	//新机构（1个月内）活泼数,老机构（持续用3个月）
	public List<Map<String, Object>> countAnalysisWeekCountCommonByCountMonthDate(Map<String, Object> params);
	
	//新签机构1周内账号开通数（校长&教师)
	public List<Map<String, Object>> countLibJoinCountCommonByCountDate(Map<String, Object> params);
	public List<Map<String, Object>> countLibJoinCountCommonByCountDateExport(Map<String, Object> params);
	
	//新签机构2周内学生账号激活	
	public Map<String, Object> countVipActivateCountCommonByCountDate(Map<String, Object> params);
	public List<Map<String, Object>> countVipActivateCountCommonByCountDateExport(Map<String, Object> params);
	
	//统计时间的type数量
	public List<Map<String, Object>> countAnalysisCountCommonByCountTask();
	

	
	
	
}
