1
0
lhm vor 3 Jahren
Ursprung
Commit
89b2dddffc

+ 12 - 2
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -2178,10 +2178,20 @@ public class OrderServiceImpl implements OrderService {
                 queryGoodsVo.setSellVolume((Integer) map.get("sellVolume"));
                 queryGoodsVo.setRetailPrice(new BigDecimal(String.valueOf(map.get("retailPrice"))));
                 queryGoodsVo.setGoodsTaxes(new BigDecimal(String.valueOf(map.get("goodstaxes"))));
-                queryGoodsVo.setDisCountedPrice(new BigDecimal(String.valueOf(map.get("discountedPrice"))));
+                Object discountedPriceObj = map.get("discountedPrice");
+                BigDecimal discountedPrice = BigDecimal.ZERO;
+                if (Objects.nonNull(discountedPriceObj)) {
+                    discountedPrice = new BigDecimal(String.valueOf(discountedPriceObj));
+                }
+                queryGoodsVo.setDisCountedPrice(discountedPrice);
                 queryGoodsVo.setTotalPrice(new BigDecimal(String.valueOf(map.get("actualPaymentAmount"))));
                 queryGoodsVo.setActivity((String) map.get("activity"));
-                queryGoodsVo.setDeductionScore((Integer) map.get("deductionScore"));
+                Object deductionScoreObj = map.get("deductionScore");
+                Integer deductionScore = 0;
+                if (Objects.nonNull(deductionScoreObj)) {
+                    deductionScore = (Integer) deductionScoreObj;
+                }
+                queryGoodsVo.setDeductionScore(deductionScore);
                 Object deductionPriceObj = map.get("deductionPrice");
                 BigDecimal deductionPrice = BigDecimal.ZERO;
                 if (Objects.nonNull(deductionPriceObj)) {