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 |    3 +++
 1 files changed, 3 insertions(+), 0 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 fea3805..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
@@ -156,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)){
@@ -172,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