| | |
| | | package cc.mrbird.febs.ai.service; |
| | | |
| | | import cc.mrbird.febs.ai.entity.AiProductQuestion; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface AiProductQuestionService extends IService<AiProductQuestion> { |
| | | |
| | | /** |
| | | * 根据ID查询AI产品题目 |
| | | * @param id 题目ID |
| | | * @return AI产品题目信息 |
| | | */ |
| | | AiProductQuestion getById(String id); |
| | | |
| | | /** |
| | | * 根据公司ID查询AI产品题目列表 |
| | | * @param companyId 公司ID |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByCompanyId(String companyId); |
| | | List<AiProductQuestion> getListByQuery(LambdaQueryWrapper<AiProductQuestion> questionLambdaQueryWrapper); |
| | | |
| | | /** |
| | | * 根据AI产品类别ID查询AI产品题目列表 |
| | | * @param productCategoryId AI产品类别ID |
| | | * @return AI产品题目列表 |
| | | * 生成一个产品题目 |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | List<AiProductQuestion> getByProductCategoryId(String productCategoryId); |
| | | |
| | | /** |
| | | * 根据题目查询AI产品题目列表 |
| | | * @param title 题目 |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByTitle(String title); |
| | | |
| | | /** |
| | | * 根据父ID查询AI产品题目列表 |
| | | * @param parentId 父ID |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByParentId(String parentId); |
| | | |
| | | /** |
| | | * 根据难度查询AI产品题目列表 |
| | | * @param difficulty 难度:1-简单,2-中等,3-困难 |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByDifficulty(Integer difficulty); |
| | | |
| | | /** |
| | | * 根据状态查询AI产品题目列表 |
| | | * @param state 状态 0-禁用 1-启用 2-已删除 |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByState(Integer state); |
| | | |
| | | /** |
| | | * 根据是否正确答案查询AI产品题目列表 |
| | | * @param correctAnswer 是否是正确答案 0-否 1-是 |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByCorrectAnswer(Integer correctAnswer); |
| | | |
| | | /** |
| | | * 根据公司ID和状态查询AI产品题目列表 |
| | | * @param companyId 公司ID |
| | | * @param state 状态 0-禁用 1-启用 2-已删除 |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByCompanyIdAndState(String companyId, Integer state); |
| | | |
| | | /** |
| | | * 根据父ID和状态查询AI产品题目列表(获取同一题目的所有选项) |
| | | * @param parentId 父ID |
| | | * @param state 状态 0-禁用 1-启用 2-已删除 |
| | | * @return AI产品题目列表 |
| | | */ |
| | | List<AiProductQuestion> getByParentIdAndState(String parentId, Integer state); |
| | | |
| | | /** |
| | | * 保存AI产品题目 |
| | | * @param aiProductQuestion AI产品题目实体 |
| | | * @return 是否保存成功 |
| | | */ |
| | | boolean saveProductQuestion(AiProductQuestion aiProductQuestion); |
| | | |
| | | /** |
| | | * 批量保存AI产品题目 |
| | | * @param productQuestions AI产品题目列表 |
| | | * @return 是否保存成功 |
| | | */ |
| | | boolean saveBatchProductQuestions(List<AiProductQuestion> productQuestions); |
| | | |
| | | /** |
| | | * 更新AI产品题目 |
| | | * @param aiProductQuestion AI产品题目实体 |
| | | * @return 是否更新成功 |
| | | */ |
| | | boolean updateProductQuestion(AiProductQuestion aiProductQuestion); |
| | | |
| | | /** |
| | | * 根据ID删除AI产品题目 |
| | | * @param id 题目ID |
| | | * @return 是否删除成功 |
| | | */ |
| | | boolean deleteById(String id); |
| | | |
| | | /** |
| | | * 根据父ID删除AI产品题目(删除整个题目及其选项) |
| | | * @param parentId 父ID |
| | | * @return 是否删除成功 |
| | | */ |
| | | boolean deleteByParentId(String parentId); |
| | | |
| | | /** |
| | | * 根据公司ID删除AI产品题目 |
| | | * @param companyId 公司ID |
| | | * @return 是否删除成功 |
| | | */ |
| | | boolean deleteByCompanyId(String companyId); |
| | | AiProductQuestion createQuestion(String productId); |
| | | } |