package com.ym.mec.biz.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ym.mec.biz.dal.entity.ImGroup;
import com.ym.mec.biz.dal.entity.TempLittleArtistTrainingCamp;
import com.ym.mec.biz.dal.vo.BaseVo;
import org.apache.ibatis.annotations.Param;

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

/**
 * 小小艺术家训练营活动(TempLittleArtistTrainingCamp)表数据库访问层
 *
 * @author hgw
 * @since 2022-05-17 20:56:22
 */
public interface TempLittleArtistTrainingCampDao extends BaseMapper<TempLittleArtistTrainingCamp> {

    int insertBatch(@Param("entities") List<TempLittleArtistTrainingCamp> entities);

    <T> IPage<T> queryUserTrainingTime(Page<T> page, @Param("param") Map<String, Object> param);

    <T> List<T> queryUserTrainingTime(@Param("param") Map<String, Object> param);

    List<Integer> queryAllUserId();

    <T> IPage<T> queryCampUser(Page<T> page, @Param("param") Map<String, Object> param);

    /**
     * imGroupId
     * search
     */
    <T> IPage<T> queryUserTrainingDetail(Page<T> page, @Param("param") Map<String, Object> param);

    <T> List<T> queryUserTrainingDetail(@Param("param") Map<String, Object> param);

    List<ImGroup> queryCampImGroup(String imGroupIds);

    Integer queryUserTrainingPlayTime(@Param("param") Map<String, Object> param);

    List<Integer> queryUserGroup(@Param("campId") Integer campId);

    List<BaseVo> queryStartTrainInfo(@Param("date") String date);

    int updateUserNum(@Param("campId") Integer campId, @Param("maxNum") Integer maxNum);
}

