From d22072910b38c3f9c71f01f02f68094426c543c8 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Thu, 25 Sep 2025 10:16:56 +0800
Subject: [PATCH] feat(ai):为公司实体添加编码字段- 在 AiCompany 实体中新增 code 字段 - 使用 ShareCodeUtil生成唯一编码 - 更新前端列表页面展示编码字段 - 调整表格列标题和字段映射 - 移除调试用的 main 方法
---
src/main/java/cc/mrbird/febs/ai/controller/product/ViewController.java | 7 ++++++-
1 files changed, 6 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 9b71c7c..1514d86 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
@@ -72,11 +72,13 @@
Set<String> productIds = new HashSet<>();
AiProduct entity = aiProductService.getById(id);
+ String companyId = entity.getCompanyId();
if(ObjectUtil.isNotNull(entity)){
//右侧数据
LambdaQueryWrapper<AiProductPointLink> query = Wrappers.lambdaQuery(AiProductPointLink.class);
if(StrUtil.isNotEmpty(id)){
query.eq(AiProductPointLink::getProductId, id);
+ query.eq(AiProductPointLink::getCompanyId, companyId);
}
List<AiProductPointLink> selectedList = aiProductPointLinkService.selectListByQuery(query);
if(CollUtil.isNotEmpty(selectedList)){
@@ -85,7 +87,7 @@
}
//左侧数据
- List<AiProductPoint> allList = aiProductPointService.pointTree();
+ List<AiProductPoint> allList = aiProductPointService.pointTree(companyId);
if(CollUtil.isNotEmpty(allList)){
//stream流操作mallMembers,生成一个新的List<MallMemberVo>
vos = allList.stream().map(AiProductPoint -> {
@@ -154,11 +156,13 @@
Set<String> productIds = new HashSet<>();
AiProduct entity = aiProductService.getById(id);
+ String companyId = entity.getCompanyId();
if(ObjectUtil.isNotNull(entity)){
//右侧数据
LambdaQueryWrapper<AiProductQuestionLink> query = Wrappers.lambdaQuery(AiProductQuestionLink.class);
if(StrUtil.isNotEmpty(id)){
query.eq(AiProductQuestionLink::getProductId, id);
+ query.eq(AiProductQuestionLink::getCompanyId, companyId);
}
List<AiProductQuestionLink> selectedList = aiProductQuestionLinkService.selectListByQuery(query);
if(CollUtil.isNotEmpty(selectedList)){
@@ -170,6 +174,7 @@
LambdaQueryWrapper<AiProductQuestion> aiProductQuestionLambdaQueryWrapper = Wrappers.lambdaQuery(AiProductQuestion.class);
aiProductQuestionLambdaQueryWrapper.eq(AiProductQuestion::getProductCategoryId, entity.getProductCategoryId());
aiProductQuestionLambdaQueryWrapper.eq(AiProductQuestion::getState, 1);
+ aiProductQuestionLambdaQueryWrapper.eq(AiProductQuestion::getCompanyId, companyId);
List<AiProductQuestion> allList = aiProductQuestionService.productQuestionTree(aiProductQuestionLambdaQueryWrapper);
if(CollUtil.isNotEmpty(allList)){
//stream流操作mallMembers,生成一个新的List<MallMemberVo>
--
Gitblit v1.9.1