package cn.com.ctop.userefficientvideomap.mapper;

import cn.com.ctop.userefficientvideomap.entity.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

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

/**
 * 有效视频与角色对应表
 * @author: jeecg-boot
 * @date:   2019-12-16
 * @cersion: V1.0
 */
@Component
public interface UserEfficientVideoMapMapper extends BaseMapper<UserEfficientVideoMap> {

    List<EffiVideoDTO> getUserVideoMap(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("startCalcDate")String startCalcDate, @Param("endCalcDate")String endCalcDate);

    int getEffiVideoCountBySignature(@Param("signature")String signature, @Param("appType")Integer appType);

    int getEffiVideoCountByUserId(@Param("year")int year, @Param("quarter")int quarter, @Param("userId")String userId);

    int getQuarterMaterialCountByUserId(@Param("roleCode")String roleCode, @Param("startTime")String startTime, @Param("endTime")String endTime, @Param("userId")String userId);

    BigDecimal getTotalCostByClipId(@Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);

    BigDecimal getTotalCostByShotId(@Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);

    BigDecimal getTotalCostByPlanId(@Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);

    BigDecimal getTotalCostByPlaneId(@Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);

    BigDecimal getProjectTotalCostByUserId(@Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);

    List<ProjectDTO> getProjectsByUserId(@Param("userId")String userId);

    int getPlaneCountByProjectId(@Param("projectId")Long projectId);

    int getPlaneCountByUserId(@Param("userId")String userId);

    List<DesignMaterialInfo> designMaterialInfoList(@Param("roleCode")String roleCode, @Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);

    List<DesignMaterialInfo> getMaterialAccountInfoByMaterialId(@Param("materialId")String materialId, @Param("startDate")String startDate, @Param("endDate")String endDate);

    List<ProjectDTO> getProjects(@Param("mediaId")String mediaId);

    BigDecimal getProjectQuarterCostById(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("projectId")Long projectId);

    List<UserDto2> getPlaneByProjectId(@Param("projectId")Long projectId);

    List<UserDto2> getKuaishouDesignLeaderList();

    List<String> getClip(@Param("depId")String depId);

    BigDecimal getClipQuarterCost(@Param("appType")Integer appType, @Param("quarter")int quarter, @Param("year")int year, @Param("userId")String userId);
}

