package com.ruoyi.mingxue.mapper;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.mingxue.domain.CustomerVideoWatches;

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

/**
 * 客户观看视频记录Mapper接口
 *
 * @author mingxue
 * @date 2021-07-28
 */
public interface CustomerVideoWatchesMapper
{
    List<JSONObject> selectClassStats(Map cond);
    JSONObject selectLearnStatsHeader(Map cond);
    List<JSONObject> selectLearnStatsDetail(Map cond);

    /**
     * 查询客户观看视频记录
     *
     * @param id 客户观看视频记录ID
     * @return 客户观看视频记录
     */
    public CustomerVideoWatches selectCustomerVideoWatchesById(Long id);

    /**
     * 查询客户观看视频记录列表
     *
     * @param customerVideoWatches 客户观看视频记录
     * @return 客户观看视频记录集合
     */
    public List<CustomerVideoWatches> selectCustomerVideoWatchesList(CustomerVideoWatches customerVideoWatches);

    /**
     * 新增客户观看视频记录
     *
     * @param customerVideoWatches 客户观看视频记录
     * @return 结果
     */
    public int insertCustomerVideoWatches(CustomerVideoWatches customerVideoWatches);

    /**
     * 修改客户观看视频记录
     *
     * @param customerVideoWatches 客户观看视频记录
     * @return 结果
     */
    public int updateCustomerVideoWatches(CustomerVideoWatches customerVideoWatches);

    /**
     * 删除客户观看视频记录
     *
     * @param id 客户观看视频记录ID
     * @return 结果
     */
    public int deleteCustomerVideoWatchesById(Long id);

    /**
     * 批量删除客户观看视频记录
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteCustomerVideoWatchesByIds(Long[] ids);

    public int countVideoWatchCount(String customerCode);

    public int countVideoWatchDuration(String customerCode);

    public List<CustomerVideoWatches> countDurationByDate(Map<String, Object> map);

    public List<CustomerVideoWatches> selectByDate(Map<String, Object> map);

    public List<CustomerVideoWatches> countDurationByDateAndSubject(Map<String, Object> map);

    public List<CustomerVideoWatches> selectTodayBySection(Map<String, Object> params);
}
