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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.auth.api.entity.SysUser;
import com.yonge.cooleshow.biz.dal.dto.req.AuthOperaReq;
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 com.yonge.cooleshow.common.entity.HttpResponseResult;
import io.swagger.models.auth.In;

import java.lang.reflect.InvocationTargetException;

/**
 * 老师入驻审核表 服务类
 * @author liweifan
 * @date 2022-03-18
 */
public interface TeacherAuthEntryRecordService extends IService<TeacherAuthEntryRecord>  {
    /***
     * 根据老师id查询审批单详情
     * @author liweifan
     * @param: id
     * @updateTime 2022/3/21 13:42
     * @return: com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo
     */
    TeacherAuthEntryRecordVo detail(Long id);
    /**
     * 自定义分页
     * @author liweifan
 	 * @date 2022-03-18
     */
    IPage<TeacherAuthEntryRecordVo> selectPage(IPage<TeacherAuthEntryRecordVo> page, AuthEntryRecordSearch search);
    /***
     * 审核
     * @author liweifan
     * @param: authOperaDto
     * @param: sysUser
     * @updateTime 2022/3/21 14:21
     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<java.lang.Boolean>
     */
    HttpResponseResult<Boolean> doAuth(AuthOperaReq authOperaReq, SysUser sysUser) throws Exception;
    /***
     * 老师入驻申请
     * @author liweifan
     * @param: teacherApplyDetailDto
     * @param: sysUser
     * @updateTime 2022/3/18 15:38
     * @return: java.lang.Boolean
     */
    HttpResponseResult<Boolean> doApply(TeacherApplyDetailReq teacherApplyDetailDto, SysUser sysUser) throws Exception;
    /***
     * 获取最后一条申请记录
     * @author liweifan
     * @param: userId
     * @updateTime 2022/3/25 15:56
     * @return: com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord
     */
    TeacherAuthEntryRecordVo getLastRecordByUserId(Long userId);
}