package com.ynfy.buss.exam.userexamresult.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ynfy.buss.exam.userexamresult.entity.UserExamResult;
import com.ynfy.buss.exam.userexamresult.entity.vo.UserExamScoreVO;

import java.util.List;

/**
 * @Description: 用户考试成绩
 * @Author: jeecg-boot
 * @Date: 2023-03-09
 * @Version: V1.0
 */
public interface IUserExamResultService extends IService<UserExamResult> {

    /**
     * 考试完成后加入成绩
     *
     * @param userId
     * @param examId
     * @param score
     * @param passed
     */
    void joinResult(String userId, String examId, Integer score, int passed);


    /**
     * 根据条件分页查询
     */
    IPage<UserExamResult> selectPageList(IPage<UserExamResult> page, UserExamResult userExamResult);


    List<UserExamResult> listByExamId(String examId);


    /**
     * 获取考试成绩
     *
     * @param examId
     * @return
     */
    UserExamScoreVO examScore(String userId, String examId);
}
