You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
exam/user/book/service/UserBookService.java

42 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.yf.exam.modules.user.book.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yf.exam.core.api.dto.PagingReqDTO;
import com.yf.exam.modules.user.book.dto.UserBookDTO;
import com.yf.exam.modules.user.book.entity.UserBook;
/**
* <p>
* 错题本业务类接口,定义了错题本相关的业务操作方法。
* 该接口继承自 MyBatis-Plus 的 IService 接口,可使用其提供的基础服务方法。
* </p>
*
* @author 聪明笨狗
* @since 2020-05-27 17:56
*/
public interface UserBookService extends IService<UserBook> {
/**
* 分页查询错题本数据
* @param reqDTO 包含分页信息和查询条件的请求对象,泛型为 UserBookDTO
* @return 包含分页结果的 UserBookDTO 对象集合,封装在 IPage 中
*/
IPage<UserBookDTO> paging(PagingReqDTO<UserBookDTO> reqDTO);
/**
* 将指定题目加入错题本
* @param examId 关联的考试 ID标识该错题所属的考试
* @param quId 关联的题目 ID标识具体是哪道题目
*/
void addBook(String examId, String quId);
/**
* 查找当前错题的下一个错题
* @param examId 关联的考试 ID限定查找范围为该考试内的错题
* @param quId 当前错题的题目 ID基于此查找下一个错题
* @return 下一个错题的题目 ID如果不存在则可能返回 null
*/
String findNext(String examId, String quId);
}