修改类目设置
This commit is contained in:
parent
cb16333e61
commit
c747158393
|
|
@ -22,6 +22,10 @@
|
|||
<groupId>com.ghy</groupId>
|
||||
<artifactId>ghy-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ghy</groupId>
|
||||
<artifactId>ghy-custom</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -105,4 +105,5 @@ public class DeptGoodsCategory extends GoodsCategory {
|
|||
|
||||
private String shopInsuranceIds;
|
||||
|
||||
private Long customerId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<DeptGoodsCategory> list(DeptGoodsCategory category) {
|
||||
|
|
@ -85,8 +94,20 @@ public class DeptGoodsCategoryServiceImpl implements DeptGoodsCategoryService {
|
|||
|
||||
@Override
|
||||
public List<DeptGoodsCategory> 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<CustomerSelection> customerSelections=customerSelectionService.selectCustomerSelectionList(customerSelection);
|
||||
List<DeptGoodsCategory> goodsCategoryList =new ArrayList<>();
|
||||
for (CustomerSelection customerSelection1 : customerSelections) {
|
||||
DeptGoodsCategory deptGoodsCategory1=deptGoodsCategoryMapper.selectOneByGoodsCategoryId(customerSelection1.getDeptCategoryId());
|
||||
goodsCategoryList.add(deptGoodsCategory1);
|
||||
}
|
||||
// 第一层
|
||||
List<DeptGoodsCategory> goodsCategoryList = deptGoodsCategoryMapper.appList(deptGoodsCategory);
|
||||
// 第二层
|
||||
this.fillChild(goodsCategoryList);
|
||||
// 第三层
|
||||
|
|
|
|||
Loading…
Reference in New Issue