From 09d39ca16207f40800969e62255a9b576dac105b Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Thu, 12 Feb 2026 14:38:15 +0800
Subject: [PATCH] fix(fileUpload): 修复文件上传唯一文件名生成逻辑
---
src/main/java/cc/mrbird/febs/ai/controller/product/ViewController.java | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/ai/controller/product/ViewController.java b/src/main/java/cc/mrbird/febs/ai/controller/product/ViewController.java
index 1514d86..7655652 100644
--- a/src/main/java/cc/mrbird/febs/ai/controller/product/ViewController.java
+++ b/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());
}
--
Gitblit v1.9.1