| | |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse productQuestionDelete(String ids) { |
| | | if (StrUtil.isEmpty(ids)) { |
| | | throw new FebsException("参数错误"); |
| | | } |
| | | List<String> idList = StrUtil.split(ids, ','); |
| | | this.update(null, |
| | | Wrappers.lambdaUpdate(AiProductQuestion.class) |
| | | .set(AiProductQuestion::getState, 2) |
| | | .set(AiProductQuestion::getUpdatedTime, new Date()) |
| | | .in(AiProductQuestion::getId, idList)); |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public List<AiProductQuestion> questionTree(String companyId) { |
| | | LambdaQueryWrapper<AiProductQuestion> query = Wrappers.lambdaQuery(AiProductQuestion.class); |
| | | if (StrUtil.isNotEmpty(companyId)){ |
| | |
| | | public FebsResponse aiAddV2(AiProductQuestionAiDto dto) { |
| | | String companyId = dto.getCompanyId(); |
| | | String productCategoryId = dto.getProductCategoryId(); |
| | | if (StrUtil.isEmpty(productCategoryId)){ |
| | | return new FebsResponse().fail().message("请选择产品分类"); |
| | | } |
| | | Integer questionCnt = dto.getQuestionCnt(); |
| | | String query = dto.getQuery(); |
| | | Integer difficulty = dto.getDifficulty(); |
| | |
| | | return; |
| | | } |
| | | int i = questionCnt - questionDoneCnt; |
| | | if (i >= 10){ |
| | | i = 10; |
| | | if (i >= 5){ |
| | | i = 5; |
| | | } |
| | | AiProductQuestionAiDto dto = new AiProductQuestionAiDto(); |
| | | String jsonFormat = "{\"question_list\":[{\"title\": \"消费者对透明质酸的主要担忧是什么?\",\"answer_list\":[{\"answer\": \"消费者担心透明质酸维持时间短,效果不明显。\",\"type\": 1,\"analysis\": \"\"},{\"answer\": \"消费者担心透明质酸注射后可能出现移位、凹陷、馒化、僵硬以及炎症反应。\",\"type\": 1,\"analysis\": \"\"},{\"answer\": \"消费者的主要担忧包括效果不明显、维持时间短、注射后出现移位、凹陷、馒化、僵硬以及炎症反应。他们希望既达到理想效果,又避免这些副作用。\",\"type\": 2,\"analysis\": \"标准答案涵盖了消费者对透明质酸的所有主要担忧,既包括效果问题,也涵盖副作用风险,全面反映消费者心理需求。\"}]}]} "; |