package com.yida.data.device.telephone.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.telephone.EduTelephoneCard;
import com.yida.data.device.vo.telephone.IcCardVO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * 亲情电话-ic卡 Mapper
 *
 * @author zhanghaijun
 * @date 2021-08-10 16:28:12
 */
public interface EduTelephoneCardMapper extends BaseMapper<EduTelephoneCard> {

    /**
     * 查询ic卡列表
     *
     * @param page
     * @param status
     * @param iccId
     * @param studentName
     * @return
     */
    IPage<IcCardVO> findCardList(Page page, @Param("status") Integer status, @Param("iccId") String iccId,
                                 @Param("studentName") String studentName, @Param("start") LocalDateTime start,
                                 @Param("now") LocalDateTime now,
                                 @Param("schoolId") Long schoolId,
                                 @Param("campusId") Long campusId,
                                 @Param("sectionId") Long sectionId,
                                 @Param("gradeId") Long gradeId,
                                 @Param("classId") Long classId);


    /**
     * 查询
     *
     * @param id
     * @return
     */
    EduTelephoneCard findStudentCard(@Param("id") Long id,
                                     @Param("now") LocalDateTime now);
}
