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.search.AuthEntryRecordSearch;
import com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord;
import com.yonge.cooleshow.biz.dal.entity.TeacherAuthMusicianRecord;
import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
import com.yonge.cooleshow.biz.dal.vo.MusicianAuthEntryRecordVo;
import com.yonge.cooleshow.common.entity.HttpResponseResult;

/**
 * 老师音乐人审核表 服务类
 * @author liweifan
 * @date 2022-03-18
 */
public interface TeacherAuthMusicianRecordService extends IService<TeacherAuthMusicianRecord>  {

    /***
     * 查询音乐人审批单详情
     * @author liweifan
     * @param: id
     * @updateTime 2022/3/22 19:57
     * @return: com.yonge.cooleshow.biz.dal.vo.MusicianAuthEntryRecordVo
     */
    MusicianAuthEntryRecordVo detail(Long id);
    /**
     * 自查询分页
     * @author liweifan
 	 * @date 2022-03-18
     */
    IPage<MusicianAuthEntryRecordVo> selectPage(IPage<MusicianAuthEntryRecordVo> page, AuthEntryRecordSearch authEntryRecordSearch);

    /***
     * 获取音乐人认证状态
     * @author liweifan
     * @param: id
     * @updateTime 2022/3/21 19:27
     * @return: java.lang.Integer
     */
    AuthStatusEnum getMusicianAuthStatus(Long id);
    /***
     * 审核
     * @author liweifan
     * @param: authOperaReq
     * @param: sysUser
     * @updateTime 2022/3/22 20:06
     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<java.lang.Boolean>
     */
    HttpResponseResult<Boolean> doAuth(AuthOperaReq authOperaReq, SysUser sysUser) throws Exception;
    /***
     * 提交音乐人审批申请
     * @author liweifan
     * @param: id
     * @updateTime 2022/3/21 19:39
     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<java.lang.Boolean>
     */
    HttpResponseResult<Boolean> doApply(Long id);
    /***
     * 获取最后一条申请记录
     * @author liweifan
     * @param: userId
     * @updateTime 2022/3/25 15:56
     * @return: com.yonge.cooleshow.biz.dal.entity.TeacherAuthMusicianRecord
     */
    TeacherAuthMusicianRecord getLastRecordByUserId(Long userId);
}