Administrator
2026-02-12 4b62aeaa85b5700217b8130903342a8fb27ac453
src/main/java/cc/mrbird/febs/ai/controller/product/ViewController.java
@@ -175,13 +175,21 @@
            aiProductQuestionLambdaQueryWrapper.eq(AiProductQuestion::getProductCategoryId, entity.getProductCategoryId());
            aiProductQuestionLambdaQueryWrapper.eq(AiProductQuestion::getState, 1);
            aiProductQuestionLambdaQueryWrapper.eq(AiProductQuestion::getCompanyId, companyId);
            aiProductQuestionLambdaQueryWrapper.orderByDesc(AiProductQuestion::getDifficulty);
            List<AiProductQuestion> allList = aiProductQuestionService.productQuestionTree(aiProductQuestionLambdaQueryWrapper);
            if(CollUtil.isNotEmpty(allList)){
                //stream流操作mallMembers,生成一个新的List<MallMemberVo>
                vos = allList.stream().map(AiProductQuestion -> {
                    AdminMoveChooseInfoVo vo = new AdminMoveChooseInfoVo();
                    vo.setId(AiProductQuestion.getId());
                    vo.setName(AiProductQuestion.getTitle());
                    String name = AiProductQuestion.getTitle();
                    String difficulty = AiProductQuestion.getDifficulty() == 1 ? "简单" : AiProductQuestion.getDifficulty() == 2 ? "中等" : "困难";
                    name = difficulty+"-"+name;
                    String label = AiProductQuestion.getLabel();
                    if (StrUtil.isNotEmpty(label)){
                        name = label+"-"+name;
                    }
                    vo.setName(name);
                    return vo;
                }).collect(Collectors.toList());
            }