package org.jeecg.modules.performance.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.performance.entity.Performance;
import org.jeecg.modules.performance.vo.OptimizerCostDetailVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * 设计师季度绩效表
 *
 * @author: jeecg-boot
 * @date: 2019-12-10
 * @cersion: V1.0
 */
public interface PerformanceMapper extends BaseMapper<Performance> {
    List<OptimizerCostDetailVO> getKuaishouOptimizerTotalCostDetailGroupByUserId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);

    List<OptimizerCostDetailVO> getBytedanceOptimizerTotalCostDetailGroupByUserId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);

    List<OptimizerCostDetailVO> getOptimizerTotalCostDetailGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);

    List<OptimizerCostDetailVO> getKuaishouUserOptimizerTotalCostGroupByProjectId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId);

    List<OptimizerCostDetailVO> getBytedanceUserOptimizerTotalCostGroupByProjectId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId);

    List<OptimizerCostDetailVO> getKuaishouUserOptimizerTotalCostGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId, @Param(value = "accountId") Long accountId);

    List<OptimizerCostDetailVO> getBytedanceUserOptimizerTotalCostGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId, @Param(value = "accountId") Long accountId);

    List<OptimizerCostDetailVO> getKuaishouMemberPerformanceByOrgCode(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "orgCode") String orgCode);

    List<OptimizerCostDetailVO> getBytedanceMemberPerformanceByOrgCode(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "orgCode") String orgCode);

    OptimizerCostDetailVO getKuaishouOptimizerTotalCost(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter);

    OptimizerCostDetailVO getBytedanceOptimizerTotalCost(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter);

    BigDecimal getBytedanceSeasonTotalCost(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate);

    BigDecimal getKuaishouSeasonTotalCost(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate);

    BigDecimal getKuaishouSalesSeasonTotalCostByParams(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "saleId") String saleId, @Param(value = "advertiserId") String advertiserId, @Param(value = "accountId") Long accountId);

    BigDecimal getBytedanceSalesSeasonTotalCostByParams(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "saleId") String saleId, @Param(value = "advertiserId") String advertiserId, @Param(value = "accountId") Long accountId);
}
