package com.xhkjedu.suser.mapper.subjectbook;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.suser.model.subjectbook.TTeacherPowersb;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName TeacherPowersbMapper
 * Description 教师教材权限
 * Author WN
 * Date 2020/7/1 19:05
 **/
@Repository
public interface TeacherPowersbMapper extends TkMapper<TTeacherPowersb> {

    /**
     *功能描述  根据用户id删除教师权限教材
     * @author WN
     * @date 2020/7/1
     * @param  * @param userid
     * @return void
     */
    void deleteByUserid(@Param("userid")Integer userid);

    /**
     *功能描述  获取教师权限教材
     * @author WN
     * @date 2020/7/1
     * @param  * @param userid
     * @return java.util.List<com.xhkjedu.vo.subjectbook.TeacherSubjectbookVo>
     */
    List<Map> listLsbsByUserid(@Param("userid")Integer userid);

    /**
     * 教师权限科目
     * @Param [teacherid]
     * @Author ywx
     * @Date 2020/7/24 9:26
     * @return java.util.List<com.xhkjedu.vo.subjectbook.SubjectVo>
     **/
    List<Map> listSubject(@Param("teacherid") Integer teacherid);

    /**
     *功能描述 教师权限科目下，权限教材
     * @author WN
     * @date 2020/8/11
     * @param  * @param teacherid
     * @param subjectid
     * @return java.util.List<com.xhkjedu.vo.subjectbook.LsbBookVo>
     */
    List<Map> listBookBySubjectid(@Param("teacherid") Integer teacherid, @Param("subjectid") String subjectid);

    //根据教材id获取科目id
    String getSubjectidBylsbid(@Param("lsbid") String lsbid);

    /*
    * @Description 获取用户任教科目id
    * @Author WN
    * @Date 2023/5/11 16:02:24
    */
    String getSubjectidByUserid(@Param("userid") Integer userid);

    //获取教材下科目数量
    Integer countSubjectByLsbId(@Param("lsbids") List<String> lsblist);

    //获取班级下年级数量
    Integer countGradeByClassId(@Param("classids") List<Integer> classids);
}
