package com.cf.imes.module.infra.dal.mysql.demo;

import java.util.*;

import PageResult;
import PageParam;
import LambdaQueryWrapperX;
import BaseMapperX;
import com.cf.imes.module.infra.dal.dataobject.demo.InfraStudentContactDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 学生联系人 Mapper
 *
 * @author 晨丰科技
 */
@Mapper
public interface InfraStudentContactMapper extends BaseMapperX<InfraStudentContactDO> {

    default PageResult<InfraStudentContactDO> selectPage(PageParam reqVO, Long studentId) {
        return selectPage(reqVO, new LambdaQueryWrapperX<InfraStudentContactDO>()
            .eq(InfraStudentContactDO::getStudentId, studentId)
            .orderByDesc(InfraStudentContactDO::getId));
    }

    default int deleteByStudentId(Long studentId) {
        return delete(InfraStudentContactDO::getStudentId, studentId);
    }

}
