Commit b38a516a by “zcwang”

modify: 物理类目为空处理

parent c3247272
......@@ -1013,18 +1013,20 @@ public class ChangeFlowBiz {
itemBasicInfoVO.setQcCategory(collect);
} else {
itemBasicInfoVO.setQcCategory("/");
}
}
List<SimplePhyCateGoryResultCo> simplePhyCateGoryResultCos = categoryChain.get(itemId);
log.debug("[detail] simplePhyCateGoryResultCos:{}", JSON.toJSONString(simplePhyCateGoryResultCos));
if (CollectionUtils.isEmpty(simplePhyCateGoryResultCos)) {
throw ExceptionFactory.createBiz(ResponseCode.THIRD_ERR, "未查询到物理类目");
itemBasicInfoVO.setPhyCategory(null);
} else {
List<CategoryInfoVO> categoryInfoVOS = simplePhyCateGoryResultCos.stream().map(phy -> {
CategoryInfoVO categoryInfoVO = new CategoryInfoVO();
categoryInfoVO.setId(phy.getId());
categoryInfoVO.setName(phy.getName());
return categoryInfoVO;
}).collect(Collectors.toList());
itemBasicInfoVO.setPhyCategory(categoryInfoVOS);
}
List<CategoryInfoVO> categoryInfoVOS = simplePhyCateGoryResultCos.stream().map(phy -> {
CategoryInfoVO categoryInfoVO = new CategoryInfoVO();
categoryInfoVO.setId(phy.getId());
categoryInfoVO.setName(phy.getName());
return categoryInfoVO;
}).collect(Collectors.toList());
itemBasicInfoVO.setPhyCategory(categoryInfoVOS);
Optional<SpuTO> optionalSpuTO = spuTOS.stream().filter(spu -> spu.getId() == itemId).findAny();
if (!optionalSpuTO.isPresent()) {
throw ExceptionFactory.createBiz(ResponseCode.THIRD_ERR, "未查询到商品详情");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment