修改品类库数据
This commit is contained in:
@ -43,12 +43,6 @@ public class CoscoCategoryServiceImpl implements ICoscoCategoryService {
|
||||
|
||||
@Override
|
||||
public BaseResponse<List<CoscoCategoryMaintenanceVO>> selectCategoryTree(CoscoCategoryMaintenanceVO coscoCategory) {
|
||||
;
|
||||
// List<CoscoCategory> coscoCategories = coscoCategoryMapper.selectCoscoCategoryList(coscoCategory);
|
||||
// List<CoscoCategoryVO> cosco = new ArrayList<>();
|
||||
// for (CoscoCategory co : coscoCategories) {
|
||||
// cosco.add(BeanUtil.toBean(co, CoscoCategoryVO.class));
|
||||
// }
|
||||
coscoCategory.setVersionId(1L);
|
||||
BaseResponse<List<CoscoCategoryMaintenanceVO>> treeList = categoryClient.getTreeList(coscoCategory);
|
||||
return treeList;
|
||||
@ -104,21 +98,12 @@ public class CoscoCategoryServiceImpl implements ICoscoCategoryService {
|
||||
CoscoCategoryMaintenance data = info.getData();
|
||||
categoryNameList.add(data.getCategoryName());
|
||||
}else{
|
||||
categoryNameList.add(coscoCategoryMapper.selectCategoryNameById(id));
|
||||
categoryNameList.add(null);
|
||||
}
|
||||
}
|
||||
return categoryNameList;
|
||||
}
|
||||
|
||||
private List<CoscoCategoryVO> buildTree(List<CoscoCategoryVO> categories) {
|
||||
// 获取所有顶级节点 (parentId = "0")
|
||||
List<CoscoCategoryVO> rootNodes = categories.stream()
|
||||
.filter(c -> CoscoCategoryConstant.LEVEL_TOP.equals(c.getParentId()))
|
||||
.map(this::convertToTreeDto)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user