package com.centreproject.system.mapper.kpi;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.centreproject.system.domain.kpi.revenueAttendance.KpiRevenueAttendance;
import com.centreproject.system.domain.vo.RevenueTrackingDetailVo;
import com.centreproject.system.domain.vo.RevenueTrackingVo;

import java.util.List;

/**
 * @author zhonglei.xu
 */
@DS("master")
public interface KpiRevenueAttendanceMapper extends BaseMapper<KpiRevenueAttendance> {

    RevenueTrackingVo getRevenueTrackingVoByLast60DaysOfSum();

    List<RevenueTrackingDetailVo> getRevenueTrackingVoByLast60DaysOfDetail();

    List<KpiRevenueAttendance> getVisitorSegmentationByLast60DaysOfSum();

    List<KpiRevenueAttendance> getVisitorSegmentationByLast60DaysTo120DaysOfSum();

    int batchInsertOrUpdate(List<KpiRevenueAttendance> dbResults);
}
