From 37703ec19f0ae84945e1dbcded3e374f4258355c Mon Sep 17 00:00:00 2001 From: liaoxuwei <5789413@qq.com> Date: Wed, 11 Dec 2024 10:48:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhx/module/product/service/impl/ProductServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/enterprise-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductServiceImpl.java b/enterprise-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductServiceImpl.java index f128c9d..2432036 100644 --- a/enterprise-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductServiceImpl.java +++ b/enterprise-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductServiceImpl.java @@ -331,6 +331,10 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, }else { entity.setFavoriteStatus(0); } + String categoryIds = productCategoryService.find(new ProductCategoryQuery().productId(entity.getId())).stream().map(i -> i.getCategoryId().toString()).distinct().collect(Collectors.joining(",")); + String companyIds = companyProductService.find(new CompanyProductQuery().productId(entity.getId())).stream().map(i -> i.getCompanyId().toString()).distinct().collect(Collectors.joining(",")); + entity.setCompanyId(companyIds); + entity.setCategoryId(categoryIds); } return entity; } -- 2.24.3