package com.template.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.template.model.pojo.SmartFaceDiscern;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.template.model.vo.FaceDiscernVo;
import com.template.model.vo.FaceManagementVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ceshi
 * @since 2024-01-18
 */
@Repository
public interface SmartFaceDiscernMapper extends BaseMapper<SmartFaceDiscern> {

    IPage<FaceManagementVo> faceManagement(Page<FaceManagementVo> page, @Param("keyWord") String keyWord, @Param("gradeId") String gradeId, @Param("classId") String classId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<FaceManagementVo> faceManagementExport(@Param("keyWord") String keyWord, @Param("gradeId") String gradeId, @Param("classId") String classId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<FaceDiscernVo> queryFaceCountByDate(@Param("startTime") String startTime, @Param("endTime") String endTime);

    List<SmartFaceDiscern> toDateList(@Param("start") LocalDateTime start,@Param("end") LocalDateTime end);

    List<SmartFaceDiscern> toDateAndPlacelist(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("location") String location);
}
