商品列表报错问题

This commit is contained in:
wangw 2024-11-20 14:20:33 +08:00
parent c1d3760845
commit af8934dcba
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ public class TbProductServiceImpl implements TbProductService {
tbProductVo.setRealSalesNumber(0.00);
} else {
for (Object[] o : objects) {
if (((Integer) o[1]).equals(product.getId())) {
if (o[1] != null && ((Integer) o[1]).equals(product.getId())) {
if (o[0] != null) {
BigDecimal bigDecimal = (BigDecimal) o[0];
tbProductVo.setRealSalesNumber(bigDecimal.doubleValue());