From 29aeb3b2ffc19faa349ab251e12c330bb6898ad2 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 15 一月 2025 14:09:26 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
index 6c3f7fd..5d46a3e 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -218,8 +218,8 @@
 					}else{
 						price.setCash(goodsVip.getSellingPrice());
 						price.setPoint(goodsVip.getIntegral());
-						price.setCashPayment(goodsVip.getCashPayment() == 1);
-						price.setPointPayment(goodsVip.getPointPayment() == 1);
+						price.setCashPayment(null != goodsVip.getCashPayment() && goodsVip.getCashPayment() == 1);
+						price.setPointPayment(null != goodsVip.getPointPayment() && goodsVip.getPointPayment() == 1);
 						price.setEarnSpendingPoints(goodsVip.getEarnSpendingPoints());
 						price.setSuperiorSubcommission(goodsVip.getSuperiorSubcommission());
 						price.setSuperiorRebatePoints(goodsVip.getSuperiorRebatePoints());
@@ -236,8 +236,8 @@
 				}else{
 					price.setCash(goodsArea.getSellingPrice());
 					price.setPoint(goodsArea.getIntegral());
-					price.setCashPayment(goodsArea.getCashPayment() == 1);
-					price.setPointPayment(goodsArea.getPointPayment() == 1);
+					price.setCashPayment(null !=goodsArea.getCashPayment() && goodsArea.getCashPayment() == 1);
+					price.setPointPayment(null !=goodsArea.getPointPayment() && goodsArea.getPointPayment() == 1);
 					price.setEarnSpendingPoints(goodsArea.getEarnSpendingPoints());
 					price.setSuperiorSubcommission(goodsArea.getSuperiorSubcommission());
 					price.setSuperiorRebatePoints(goodsArea.getSuperiorRebatePoints());
@@ -304,8 +304,8 @@
 			if(goodsSeckill.getCashPayment() == 0 && goodsSeckill.getPointPayment() == 1){
 				price.setPoint(goodsSeckill.getIntegral());
 			}
-			price.setCashPayment(goodsSeckill.getCashPayment() == 1);
-			price.setPointPayment(goodsSeckill.getPointPayment() == 1);
+			price.setCashPayment(null != goodsSeckill.getCashPayment() && goodsSeckill.getCashPayment() == 1);
+			price.setPointPayment(null != goodsSeckill.getPointPayment() && goodsSeckill.getPointPayment() == 1);
 			price.setEndTime(goodsSeckill.getEndTime());
 			price.setEarnSpendingPoints(goodsSeckill.getEarnSpendingPoints());
 			price.setSuperiorSubcommission(goodsSeckill.getSuperiorSubcommission());

--
Gitblit v1.7.1