修改类目中的设置的时候显示全部的类目

This commit is contained in:
cb 2025-06-10 16:55:31 +08:00
parent f68eb53363
commit 5b8fe3cd58
2 changed files with 10 additions and 4 deletions

View File

@ -106,4 +106,6 @@ public class DeptGoodsCategory extends GoodsCategory {
private String shopInsuranceIds; private String shopInsuranceIds;
private Long customerId; private Long customerId;
private Integer isSetting;
} }

View File

@ -105,10 +105,14 @@ public class DeptGoodsCategoryServiceImpl implements DeptGoodsCategoryService {
List<DeptGoodsCategory> goodsCategoryList =new ArrayList<>(); List<DeptGoodsCategory> goodsCategoryList =new ArrayList<>();
log.info("用户id{}获取到的类目列表{}",customerId,customerSelections); log.info("用户id{}获取到的类目列表{}",customerId,customerSelections);
// 第一层 // 第一层
for (CustomerSelection customerSelection1 : customerSelections) { if (deptGoodsCategory.getIsSetting()==1){
DeptGoodsCategory deptGoodsCategory1=deptGoodsCategoryMapper.selectOneByGoodsCategoryId(customerSelection1.getDeptCategoryId()); goodsCategoryList = deptGoodsCategoryMapper.appList(deptGoodsCategory);
if (customerSelection1.getSelectionType()==1&& Objects.equals(deptGoodsCategory.getType(), deptGoodsCategory1.getType())){ }else{
goodsCategoryList.add(deptGoodsCategory1); for (CustomerSelection customerSelection1 : customerSelections) {
DeptGoodsCategory deptGoodsCategory1=deptGoodsCategoryMapper.selectOneByGoodsCategoryId(customerSelection1.getDeptCategoryId());
if (customerSelection1.getSelectionType()==1&& Objects.equals(deptGoodsCategory.getType(), deptGoodsCategory1.getType())){
goodsCategoryList.add(deptGoodsCategory1);
}
} }
} }
log.info("筛选完的类目列表{}",goodsCategoryList); log.info("筛选完的类目列表{}",goodsCategoryList);