Administrator
2025-09-03 18fdf89338e84e1cab48c2795631777e22b05b81
src/main/java/cc/mrbird/febs/ai/service/impl/AiMemberAnswerServiceImpl.java
@@ -9,6 +9,7 @@
import cc.mrbird.febs.ai.service.*;
import cc.mrbird.febs.ai.utils.UUID;
import cc.mrbird.febs.common.entity.FebsResponse;
import cc.mrbird.febs.common.exception.FebsException;
import cc.mrbird.febs.common.utils.LoginUserUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUnit;
@@ -61,7 +62,7 @@
        String productId = dto.getId();
        AiProduct aiProduct = aiProductService.getById(productId);
        if(ObjectUtil.isNull(aiProduct)){
            throw new RuntimeException("产品不存在");
            throw new FebsException("产品不存在");
        }
        //验证产品分类下是否有题目
        String productCategoryId = aiProduct.getProductCategoryId();
@@ -72,7 +73,7 @@
        List<AiProductQuestion> aiProductQuestions = aiProductQuestionService.getListByQuery(questionLambdaQueryWrapper);
        if(CollUtil.isEmpty(aiProductQuestions)){
            // todo 没有题目采用AI生成题目
            throw new RuntimeException("产品没有题目");
            throw new FebsException("产品没有题目");
        }
        //判断该产品是否有正在进行的练习
        Date createdTime = new Date();
@@ -134,7 +135,7 @@
        String productId = dto.getId();
        AiProduct aiProduct = aiProductService.getById(productId);
        if(ObjectUtil.isNull(aiProduct)){
            throw new RuntimeException("产品不存在");
            throw new FebsException("产品不存在");
        }
        //验证产品分类下是否有题目
        String productCategoryId = aiProduct.getProductCategoryId();
@@ -145,7 +146,7 @@
        List<AiProductQuestion> aiProductQuestions = aiProductQuestionService.getListByQuery(questionLambdaQueryWrapper);
        if(CollUtil.isEmpty(aiProductQuestions)){
            // todo 没有题目采用AI生成题目
            throw new RuntimeException("产品没有题目");
            throw new FebsException("产品没有题目");
        }
        //判断该产品是否有正在进行的练习
        Date createdTime = new Date();
@@ -246,7 +247,7 @@
        AiMemberAnswer aiMemberAnswer = this.getById(memberAnswerId);
        if(ObjectUtil.isNull(aiMemberAnswer)){
            throw new RuntimeException("答题记录不存在");
            throw new FebsException("答题记录不存在");
        }
        Date createdTime = new Date();