| | |
| | | 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 difficulty = AiProductQuestion.getDifficulty() == 1 ? "简单" : AiProductQuestion.getDifficulty() == 2 ? "中等" : "困难"; |
| | | vo.setName("("+difficulty+")"+AiProductQuestion.getTitle()); |
| | | return vo; |
| | | }).collect(Collectors.toList()); |
| | | } |