package com.zhongzheng.modules.exam.service;

import com.zhongzheng.modules.exam.domain.ExamKnowledge;
import com.zhongzheng.modules.exam.vo.ExamKnowledgeVo;
import com.zhongzheng.modules.exam.bo.ExamKnowledgeQueryBo;
import com.zhongzheng.modules.exam.bo.ExamKnowledgeAddBo;
import com.zhongzheng.modules.exam.bo.ExamKnowledgeEditBo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Collection;
import java.util.List;

/**
 * 知识点Service接口
 *
 * @author ruoyi
 * @date 2021-10-18
 */
public interface IExamKnowledgeService extends IService<ExamKnowledge> {
	/**
	 * 查询单个
	 * @return
	 */
	ExamKnowledgeVo queryById(Long knowledgeId);

	/**
	 * 查询列表
	 */
	List<ExamKnowledgeVo> queryList(ExamKnowledgeQueryBo bo);

	/**
	 * 根据新增业务对象插入知识点
	 * @param bo 知识点新增业务对象
	 * @return
	 */
	Boolean insertByAddBo(ExamKnowledgeAddBo bo);

	/**
	 * 根据编辑业务对象修改知识点
	 * @param bo 知识点编辑业务对象
	 * @return
	 */
	Boolean updateByEditBo(ExamKnowledgeEditBo bo);

	/**
	 * 校验并删除数据
	 * @param ids 主键集合
	 * @param isValid 是否校验,true-删除前校验,false-不校验
	 * @return
	 */
	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

	long queryListTotal(ExamKnowledgeQueryBo bo);
}
