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.biz.dal.dto.req.TeacherMusicSheetAuditReq;
import com.yonge.cooleshow.biz.dal.dto.search.TeacherMusicSheetAuditSearch;
import com.yonge.cooleshow.biz.dal.entity.MusicSheetAuthRecord;
import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
import com.yonge.cooleshow.biz.dal.vo.MusicSheetDetailVo;
import com.yonge.cooleshow.biz.dal.vo.MusicSheetVo;
import com.yonge.cooleshow.biz.dal.vo.TeacherMusicSheetVo;
import com.yonge.cooleshow.biz.dal.wrapper.MusicSheetWrapper;

import java.util.List;

/**
 * 曲目审核表 服务类
 * @author liweifan
 * @date 2022-04-02
 */
public interface MusicSheetAuthRecordService extends IService<MusicSheetAuthRecord>  {

    /**
     * 曲目审核
     *
     * @param param 审核信息
     * @param userId 用户id
     * @return boolean
     */
    void audit(TeacherMusicSheetAuditReq param, Long userId);

    /**
     * 设置曲目审核中状态
     *  @param musicSheetId 曲目id
     * @param originalMusicSheetId
     * @param lastMusicSheetId
     */
//    void setAuditDoing(Long musicSheetId, Long originalMusicSheetId, Long lastMusicSheetId);

    /**
     * 获取当前曲目审核理由
     *
     * @param musicSheetId 曲目id
     * @return
     */
    String selectAuditReason(Long musicSheetId);

    Integer addRecord(MusicSheetAuthRecord musicSheetAuthRecord);

    void updateRecord(MusicSheetAuthRecord musicSheetAuthRecord);

    IPage<TeacherMusicSheetVo> selectAuditPage(IPage<TeacherMusicSheetVo> page, TeacherMusicSheetAuditSearch query);

    MusicSheetDetailVo auditDetail(Long musicSheetAuthRecordId);

    List<MusicSheetWrapper.MusicSheetDetailVo> auditDetailList(String batchNo);

    MusicSheetDetailVo auditDetail(String id);

    //将曲目信息替换成最新的json中的数据
    IPage convertMusicDetail(IPage<MusicSheetVo> musicSheetVoIPage, AuthStatusEnum auditStatus);
}