package com.qmth.teachcloud.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.teachcloud.common.bean.dto.TaskPrintClassDto;
import com.qmth.teachcloud.common.bean.result.BasicStudentResult;
import com.qmth.teachcloud.common.entity.BasicStudent;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import java.util.Set;

/**
 * <p>
 * 学校id Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2021-08-02
 */
public interface BasicStudentMapper extends BaseMapper<BasicStudent> {

    List<TaskPrintClassDto> listByClass(@Param("schoolId") Long schoolId, @Param("stringList") Set<String> stringList);

    IPage<BasicStudentResult> findBasicStudentPage(@Param("iPage") Page<BasicStudentResult> iPage,
                                                   @Param("queryParams") String queryParams,
                                                   @Param("schoolId") Long schoolId,
                                                   @Param("campusId") Long campusId,
                                                   @Param("collegeId") Long collegeId,
                                                   @Param("majorId") Long majorId,
                                                   @Param("clazzIdList") Set<Long> clazzIdList,
                                                   @Param("orgIds") Set<Long> orgIds);

    /**
     * 根据基础学生主键同步删除教学学生信息
     * @param idSet 基础学生id集合
     * @return 删除的行数
     */
    int deleteTeachStudentByBasicStudentIdSet(@Param("idSet") Set<Long> idSet);
}
