package cn.iocoder.byzs.module.blockly.dal.mysql.blocklyConfig;

import cn.iocoder.byzs.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.byzs.module.blockly.controller.admin.blocklyConfig.vo.BlocklyConfigPageReqVO;
import cn.iocoder.byzs.module.blockly.controller.admin.blocklyConfig.vo.BlocklyConfigRespVO;
import cn.iocoder.byzs.module.blockly.dal.dataobject.blocklyConfig.BlocklyConfigDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 课程配置 Mapper
 *
 * @author 博雅智算源码
 */
@Mapper
public interface BlocklyConfigMapper extends BaseMapperX<BlocklyConfigDO> {

//    default PageResult<BlocklyConfigDO> selectPage(BlocklyConfigPageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<BlocklyConfigDO>()
//                .eqIfPresent(BlocklyConfigDO::getCcCourseId, reqVO.getCcCourseId())
//                .eqIfPresent(BlocklyConfigDO::getCcTime, reqVO.getCcTime())
//                .eqIfPresent(BlocklyConfigDO::getCcQuestId, reqVO.getCcQuestId())
//                .eqIfPresent(BlocklyConfigDO::getCcAnswerJudge, reqVO.getCcAnswerJudge())
//                .orderByDesc(BlocklyConfigDO::getId));
//    }

    List<BlocklyConfigPageReqVO> selectBlocklyConfigPage(BlocklyConfigPageReqVO reqVO);
    Integer selectBlocklyConfigCount(BlocklyConfigPageReqVO reqVO);

    /**
     * 根据课程id列表查询课程配置
     *
     * @param ccCourseIds 课程id列表
     * @return 课程配置列表
     */
    List<BlocklyConfigRespVO> getBlocklyConfigQuestionByCourseIds(@Param("ccCourseIds") List<Long> ccCourseIds);
}