package com.xhkjedu.smarking.mapper.paper;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.smarking.model.paper.MsPaperFile;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description 阅卷试卷附件表 Mapper 接口
 * @Author auto
 * @Date 2024-10-15
 */
public interface MsPaperFileMapper extends TkMapper<MsPaperFile> {

    //删除试卷指定类型附件
    int deleteByMpidAndType(@Param("mpid")Integer mpid,@Param("filetype") Integer filetype);

    //删除试卷文件
    int deleteByMpid(@Param("mpid")Integer mpid);

    //试卷附件
    List<MsPaperFile> listFilesbyMpidAndType(@Param("mpid")Integer mpid,@Param("filetype") Integer filetype);

    //试卷原卷或答案
    List<Map<String,Object>> listFileByFiletype(@Param("mpid")Integer mpid, @Param("filetype") Integer filetype);

    //更改试卷附件源文件路径
    int updateSourcepathByMpid(@Param("mpid")Integer mpid,@Param("sourcepath")String sourcepath,@Param("filetype") Integer filetype);
}
