fix: 修复店铺商品标签排序不正确问题
This commit is contained in:
parent
bd0f1f0b23
commit
0ba493d71d
@ -58,6 +58,7 @@ public class StoreGoodsLabelServiceImpl extends ServiceImpl<StoreGoodsLabelMappe
|
|||||||
list.stream()
|
list.stream()
|
||||||
.filter(label -> label.getParentId() != null && label.getParentId().equals(storeGoodsLabel.getId()))
|
.filter(label -> label.getParentId() != null && label.getParentId().equals(storeGoodsLabel.getId()))
|
||||||
.forEach(storeGoodsLabelChild -> storeGoodsLabelVOChildList.add(new StoreGoodsLabelVO(storeGoodsLabelChild.getId(), storeGoodsLabelChild.getLabelName(), storeGoodsLabelChild.getLevel(), storeGoodsLabelChild.getSortOrder())));
|
.forEach(storeGoodsLabelChild -> storeGoodsLabelVOChildList.add(new StoreGoodsLabelVO(storeGoodsLabelChild.getId(), storeGoodsLabelChild.getLabelName(), storeGoodsLabelChild.getLevel(), storeGoodsLabelChild.getSortOrder())));
|
||||||
|
storeGoodsLabelVOChildList.sort(Comparator.comparing(StoreGoodsLabelVO::getSortOrder));
|
||||||
storeGoodsLabelVO.setChildren(storeGoodsLabelVOChildList);
|
storeGoodsLabelVO.setChildren(storeGoodsLabelVOChildList);
|
||||||
storeGoodsLabelVOList.add(storeGoodsLabelVO);
|
storeGoodsLabelVOList.add(storeGoodsLabelVO);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user