package com.yinlihupo.enlish.service.domain.mapper;

import com.yinlihupo.enlish.service.domain.dataobject.WordMasteryLogDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WordMasteryLogDOMapper {

    // 查询指定学生指定单元的词，根据记忆强度排序
    List<WordMasteryLogDO> selectByStudentIdAndUnitIdOrderByMemoryStrength(@Param("studentId") Integer studentId, @Param("unitId") Integer unitId, @Param("limit") Integer limit);

    // 初始化、批量学生单词记忆
    int batchInsertInitialization(@Param("wordIds") List<Integer> wordIds, @Param("studentId") Integer studentId);

    int batchUpdateStudentMastery(@Param("wordMasteryLogDOs") List<WordMasteryLogDO> wordMasteryLogDOs);

    int selectStudentStrengthCount(@Param("studentId") Integer studentId);

    List<WordMasteryLogDO> selectByStudentIdAndLimitTime(@Param("studentId") Integer studentId);

    List<WordMasteryLogDO> selectAllByStudentId(@Param("studentId") Integer studentId);

    Integer selectMasteryCount(@Param("studentId") Integer studentId);

    Integer selectNotMasteryCount(@Param("studentId") Integer studentId);
}