package cn.iocoder.yudao.module.jx.mapper;

import cn.iocoder.yudao.module.jx.domain.DriveSchoolExamPass;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 考试通过Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-07
 */
@Mapper
public interface DriveSchoolExamPassMapper
{
    /**
     * 查询考试通过
     *
     * @param id 考试通过主键
     * @return 考试通过
     */
    public DriveSchoolExamPass selectDriveSchoolExamPassById(Long id);

    /**
     * 查询考试通过列表
     *
     * @param driveSchoolExamPass 考试通过
     * @return 考试通过集合
     */
    public IPage<DriveSchoolExamPass> selectDriveSchoolExamPassList(@Param("entity") DriveSchoolExamPass driveSchoolExamPass, Page<DriveSchoolExamPass> page);

    /**
     * 新增考试通过
     *
     * @param driveSchoolExamPass 考试通过
     * @return 结果
     */
    public int insertDriveSchoolExamPass(DriveSchoolExamPass driveSchoolExamPass);

    /**
     * 修改考试通过
     *
     * @param driveSchoolExamPass 考试通过
     * @return 结果
     */
    public int updateDriveSchoolExamPass(DriveSchoolExamPass driveSchoolExamPass);

    /**
     * 删除考试通过
     *
     * @param id 考试通过主键
     * @return 结果
     */
    public int deleteDriveSchoolExamPassById(Long id);

    /**
     * 批量删除考试通过
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDriveSchoolExamPassByIds(Long[] ids);

    List<DriveSchoolExamPass> selectDriveSchoolExamPassByUserId(Long userId);

    IPage<DriveSchoolExamPass> checkList(@Param("userId") Long userId, Page<DriveSchoolExamPass> page);

    IPage<DriveSchoolExamPass> getBalanceList(@Param("entity") DriveSchoolExamPass driveSchoolExamPass,Page<DriveSchoolExamPass> page);
    DriveSchoolExamPass getBalance(DriveSchoolExamPass driveSchoolExamPass);
    DriveSchoolExamPass getBalanceByCaochId(DriveSchoolExamPass driveSchoolExamPass);
    DriveSchoolExamPass getBalanceApp (DriveSchoolExamPass driveSchoolExamPass);

    int pay(DriveSchoolExamPass driveSchoolExamPass);

    DriveSchoolExamPass getBalanceByCoachId(DriveSchoolExamPass driveSchoolExamPass);
}
