package org.dromara.system.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.system.domain.RegisterParentsStudent;
import org.dromara.system.domain.vo.RegisterParentsStudentVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;

/**
 * 注册-家长-学生Mapper接口
 *
 * @author boman
 * @date 2023-08-16
 */
public interface RegisterParentsStudentMapper extends BaseMapperPlus<RegisterParentsStudent, RegisterParentsStudentVo> {

    /**
     * 批量删除注册-家长-学生(只删除审核未通过的)
     *
     * @param parentsId 家长id
     * @return 结果
     */
    @InterceptorIgnore(tenantLine = "1")
    void deleteRegisterParentsStudentByParentsId(Long parentsId);

    @InterceptorIgnore(tenantLine = "1")
    List<RegisterParentsStudentVo> selectRegisterParentsStudentListByTime(@Param("monthFirst") String monthFirst, @Param("classIds")List<Long> classIds);

    @InterceptorIgnore(tenantLine = "1")
    List<RegisterParentsStudentVo> selectVoMapperList( @Param(Constants.WRAPPER)LambdaQueryWrapper<RegisterParentsStudent> lqw);

    Long updateMapperById(RegisterParentsStudent update);

    Page<RegisterParentsStudentVo> selectVoMapperPage(@Param("page")Page<Object> build, @Param(Constants.WRAPPER)LambdaQueryWrapper<RegisterParentsStudent> lqw);

    @InterceptorIgnore(tenantLine = "1")
    int deleteByIdMapper(Long id);
}
