From 4f984ab2e76cb14b1d5cdd6e5f66debc354bc738 Mon Sep 17 00:00:00 2001 From: cb <275647614@qq.com> Date: Mon, 26 May 2025 18:10:41 +0800 Subject: [PATCH] no message --- .../ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java b/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java index 17a4bbd9..74a31b3c 100644 --- a/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java +++ b/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java @@ -103,13 +103,15 @@ public class DeptGoodsCategoryServiceImpl implements DeptGoodsCategoryService { customerSelection.setCustomerId(customerId); List customerSelections=customerSelectionService.selectCustomerSelectionList(customerSelection); List goodsCategoryList =new ArrayList<>(); + log.info("用户id{}获取到的类目列表{}",customerId,customerSelections); // 第一层 for (CustomerSelection customerSelection1 : customerSelections) { DeptGoodsCategory deptGoodsCategory1=deptGoodsCategoryMapper.selectOneByGoodsCategoryId(customerSelection1.getDeptCategoryId()); - if (customerSelection1.getSelectionType()==1){ + if (customerSelection1.getSelectionType()==1&& Objects.equals(deptGoodsCategory.getType(), deptGoodsCategory1.getType())){ goodsCategoryList.add(deptGoodsCategory1); } } + log.info("筛选完的类目列表{}",goodsCategoryList); // 第二层 this.fillChild(goodsCategoryList); // 第三层