fix: hutool 依赖更新,依赖优化,获取商品详情优化

This commit is contained in:
misworga831
2023-03-21 14:39:53 +08:00
parent c793c47d45
commit 0c652eac63
4 changed files with 8 additions and 8 deletions

View File

@@ -312,9 +312,8 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
map.put("data", goodsSkuDetail);
//获取分类
String[] split = goodsSkuDetail.getCategoryPath().split(",");
map.put("wholesaleList", wholesaleService.findByGoodsId(goodsSkuDetail.getGoodsId()));
map.put("categoryName", categoryService.getCategoryNameByIds(Arrays.asList(split)));
map.put("wholesaleList", GoodsSalesModeEnum.WHOLESALE.name().equals(goodsVO.getSalesModel()) ? wholesaleService.findByGoodsId(goodsSkuDetail.getGoodsId()) : Collections.emptyList());
map.put("categoryName", CharSequenceUtil.isNotEmpty(goodsIndex.getCategoryNamePath()) ? goodsIndex.getCategoryNamePath().split(",") : null);
//获取规格信息
map.put("specs", this.groupBySkuAndSpec(goodsVO.getSkuList()));