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

import cn.iocoder.yudao.module.base.entity.DriveSchoolCourseDeduct;
import cn.iocoder.yudao.module.base.vo.DriveSchoolCourseDeductVO;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 提成配置Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-07
 */
@Mapper
public interface DriveSchoolCourseDeductMapper extends BaseMapper<DriveSchoolCourseDeduct>
{
    IPage<DriveSchoolCourseDeductVO> queryPage(@Param("page") Page<DriveSchoolCourseDeductVO> page, @Param("request") DriveSchoolCourseDeductVO request);


    void deleteBySchemeId(@Param("schemeId") String schemeId);

    void insertBatch(List<DriveSchoolCourseDeduct> list);

    @Select("SELECT * FROM drive_school_course_deduct WHERE scheme_id = #{schemeId}")
    List<DriveSchoolCourseDeduct> selectBySchemeId(@Param("schemeId") String schemeId);
}
