diff --git a/ghy-goods/pom.xml b/ghy-goods/pom.xml
index 850b6717..13f47887 100644
--- a/ghy-goods/pom.xml
+++ b/ghy-goods/pom.xml
@@ -22,6 +22,10 @@
com.ghy
ghy-common
+
+ com.ghy
+ ghy-custom
+
diff --git a/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java b/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java
index 03c722a2..a4b8232f 100644
--- a/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java
+++ b/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java
@@ -105,4 +105,5 @@ public class DeptGoodsCategory extends GoodsCategory {
private String shopInsuranceIds;
+ private Long customerId;
}
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 58aaefd2..e801a919 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
@@ -6,6 +6,10 @@ import com.ghy.common.core.domain.Ztree;
import com.ghy.common.core.text.Convert;
import com.ghy.common.utils.StringUtils;
import com.ghy.common.utils.bean.BeanUtils;
+import com.ghy.customer.domain.Customer;
+import com.ghy.customer.domain.CustomerSelection;
+import com.ghy.customer.service.CustomerService;
+import com.ghy.customer.service.ICustomerSelectionService;
import com.ghy.goods.domain.DeptGoodsCategory;
import com.ghy.goods.domain.GoodsCategory;
import com.ghy.goods.domain.GoodsImgs;
@@ -36,6 +40,11 @@ public class DeptGoodsCategoryServiceImpl implements DeptGoodsCategoryService {
private DeptGoodsCategoryMapper deptGoodsCategoryMapper;
@Resource
private GoodsImgsService goodsImgsService;
+ @Resource
+ private CustomerService customerService;
+ @Resource
+ private ICustomerSelectionService customerSelectionService;
+
@Override
public List list(DeptGoodsCategory category) {
@@ -85,8 +94,20 @@ public class DeptGoodsCategoryServiceImpl implements DeptGoodsCategoryService {
@Override
public List appList(DeptGoodsCategory deptGoodsCategory) {
+ Customer customer= customerService.selectByCustomerId(deptGoodsCategory.getCustomerId());
+ Long customerId=customer.getCustomerPlace();
+ if (customer.getPlaceStatus()==2){
+ customerId=customer.getCustomerId();
+ }
+ CustomerSelection customerSelection=new CustomerSelection();
+ customerSelection.setCustomerId(customerId);
+ List customerSelections=customerSelectionService.selectCustomerSelectionList(customerSelection);
+ List goodsCategoryList =new ArrayList<>();
+ for (CustomerSelection customerSelection1 : customerSelections) {
+ DeptGoodsCategory deptGoodsCategory1=deptGoodsCategoryMapper.selectOneByGoodsCategoryId(customerSelection1.getDeptCategoryId());
+ goodsCategoryList.add(deptGoodsCategory1);
+ }
// 第一层
- List goodsCategoryList = deptGoodsCategoryMapper.appList(deptGoodsCategory);
// 第二层
this.fillChild(goodsCategoryList);
// 第三层