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

import com.ym.mec.biz.dal.dto.BasicUserDto;
import com.ym.mec.biz.dal.dto.SimpleUserDto;
import com.ym.mec.biz.dal.entity.ExtracurricularExercises;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

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

public interface ExtracurricularExercisesDao extends BaseDAO<Long, ExtracurricularExercises> {

    int countExtraExercises(Map<String, Object> params);
    List<ExtracurricularExercises> findExtraExercises(Map<String, Object> params);

    /**
     * 查询同一个老师对同一批学员布置相同作业的最新记录
     * @param teacherId
     * @param studentIdList
     * @param content
     * @return
     */
    ExtracurricularExercises findRepeatLastExercises(@Param("teacherId") Integer teacherId,
                             @Param("studentIdList") String studentIdList,
                             @Param("content") String content);

    /**
     * @describe 获取教师在指定时间后未服务的学员
     * @author Joburgess
     * @date 2020.05.28
     * @param teacherId:
     * @param startDate:
     * @param search:
     * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
     */
    List<BasicUserDto> findNoExercisesStudentsInThisWeekWithTeacher(@Param("teacherId") Integer teacherId,
                                                                    @Param("startDate") String startDate,
                                                                    @Param("search") String search);

}
