package com.yida.data.user.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.yida.data.common.core.entity.user.EduFaceGroupUser;
import com.yida.data.common.core.entity.user.EduStaff;
import com.yida.data.common.core.entity.user.EduStudent;
import com.yida.data.common.core.entity.user.EduUserFace;
import com.yida.data.user.dto.FaceGroupUserPageDTO;
import com.yida.data.user.dto.UpdateFaceGroupUserStatusDTO;
import com.yida.data.user.vo.UserFacePageVO;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 人脸、人脸组关联信息 Mapper
 *
 * @author zhanghaijun
 * @date 2021-06-16 14:13:31
 */
public interface EduFaceGroupUserMapper extends BaseMapper<EduFaceGroupUser> {

    IPage<UserFacePageVO> listUserFacePage(Page page,
                                           @Param("dto") FaceGroupUserPageDTO dto);

    IPage<EduStudent> listStudentNotImport(
            @Param("page") Page page,
            @Param("type") Integer type,
            @Param("sex") Integer sex,
            @Param("keyword") String keyword,
            @Param("schoolId") Long schoolId,
            @Param("groupId") Long groupId,
            @Param("dormId") Long dormId, @Param("dormRoomId") Long dormRoomId,
            @Param("campusId") Long campusId, @Param("sectionId") Long sectionId,
            @Param("gradeId") Long gradeId, @Param("classId") Long classId);

    IPage<EduStaff> listStaffNotImport(
            Page page,
            @Param("sex") Integer sex,
            @Param("keyword") String keyword,
            @Param("schoolId") Long schoolId,
            @Param("groupId") Long groupId);

    List<EduStudent> listStudentNotImport(
            @Param("type") Integer type,
            @Param("sex") Integer sex,
            @Param("keyword") String keyword,
            @Param("schoolId") Long schoolId,
            @Param("groupId") Long groupId,
            @Param("dormId") Long dormId, @Param("dormRoomId") Long dormRoomId,
            @Param("campusId") Long campusId, @Param("sectionId") Long sectionId,
            @Param("gradeId") Long gradeId, @Param("classId") Long classId);

    List<EduStaff> listStaffNotImport(
            @Param("sex") Integer sex,
            @Param("keyword") String keyword,
            @Param("schoolId") Long schoolId,
            @Param("groupId") Long groupId);

    List<EduUserFace> listUserFace(@Param("ids") List<Long> ids);

    List<EduUserFace> listUserFaceByGroup(Long groupId);

    void updateStatus(UpdateFaceGroupUserStatusDTO dto);

}
