package com.yonge.cooleshow.biz.dal.dao;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.biz.dal.dto.req.TeacherApplyDetailReq;
import com.yonge.cooleshow.biz.dal.dto.search.AuthEntryRecordSearch;
import com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord;
import com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo;
import org.apache.ibatis.annotations.Param;

public interface TeacherAuthEntryRecordDao extends BaseMapper<TeacherAuthEntryRecord>{
	/***
	 * 根据老师id查询详情
	 * @author liweifan
	 * @param: id
	 * @updateTime 2022/3/21 13:43
	 * @return: com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo
	 */
	TeacherAuthEntryRecordVo detail(@Param("id") Long id);

	TeacherAuthEntryRecordVo lastDetil(@Param("id") Long id,@Param("userId") Long userId);

	/**
	 * 自定义分页
	 */
	List<TeacherAuthEntryRecordVo> selectPage(@Param("page")IPage page,@Param("param") AuthEntryRecordSearch search);

	List<TeacherAuthEntryRecordVo> historyPage(@Param("page")IPage page,@Param("param")  AuthEntryRecordSearch search);

	/***
	 * 查询最近一条申请记录
	 * @author liweifan
	 * @param: userId
	 * @updateTime 2022/3/25 16:08
	 * @return: com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord
	 */
	TeacherAuthEntryRecordVo getLastRecordByUserId(@Param("userId") Long userId);

}