package com.keao.edu.user.dao;


import com.keao.edu.common.dal.BaseDAO;
import com.keao.edu.user.dto.BaseUserInfoDto;
import com.keao.edu.user.dto.TeacherDto;
import com.keao.edu.user.entity.ExamTeacherSalary;
import com.keao.edu.user.entity.Teacher;
import org.apache.ibatis.annotations.Param;

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

public interface ExamTeacherSalaryDao extends BaseDAO<Long, ExamTeacherSalary> {

    int batchInsert(@Param("examTeacherSalaries") List<ExamTeacherSalary> examTeacherSalaries);

    int batchUpdate(@Param("teacherSalaries") List<ExamTeacherSalary> teacherSalaries);

    /**
     * @describe 获取指定考级项目下的老师分润设置
     * @author Joburgess
     * @date 2020.07.02
     * @param examId:
     * @return java.util.List<com.keao.edu.user.entity.ExamTeacherSalary>
     */
    List<ExamTeacherSalary> queryWithExam(@Param("examId") Integer examId);

    /**
     * @describe 获取指定考级项目下教师的基本信息
     * @author Joburgess
     * @date 2020.07.02
     * @param examId:
     * @return java.util.List<com.keao.edu.user.dto.BaseUserInfoDto>
     */
    List<BaseUserInfoDto> getTeachersWithExam(@Param("examId") Integer examId);

    /**
     * @describe 获取指定考级项目下指定老师的分润设置
     * @author Joburgess
     * @date 2020.07.02
     * @param examId:
     * @param teacherIds:
     * @return java.util.List<com.keao.edu.user.entity.ExamTeacherSalary>
     */
    List<ExamTeacherSalary> getWithExamAndTeacher(@Param("examId") Integer examId,
                                                  @Param("teacherIds") List<Integer> teacherIds);

    /**
     * @describe 获取与考级项目无关的教师
     * @author Joburgess
     * @date 2020.07.02
     * @param params:
     * @return java.util.List<com.keao.edu.user.entity.Teacher>
     */
    List<TeacherDto> queryUnRelatedWithExamTeachers(Map<String, Object> params);
    int countUnRelatedWithExamTeachers(Map<String, Object> params);
}
