From f58918b179998956181e915b4d32e0fbc023b844 Mon Sep 17 00:00:00 2001 From: wyn <1074145239@qq.com> Date: Fri, 8 May 2026 13:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/book/service/impl/BuyOrderServiceImpl.java | 8 ++++---- .../modules/common/service/impl/BuyOrderServiceImpl.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/peanut/modules/book/service/impl/BuyOrderServiceImpl.java b/src/main/java/com/peanut/modules/book/service/impl/BuyOrderServiceImpl.java index 58eb382..2fe57a3 100644 --- a/src/main/java/com/peanut/modules/book/service/impl/BuyOrderServiceImpl.java +++ b/src/main/java/com/peanut/modules/book/service/impl/BuyOrderServiceImpl.java @@ -460,9 +460,9 @@ public class BuyOrderServiceImpl extends ServiceImpl impl b1.setProduct(byId); b1.setExpressOrder(expressOrderDao.selectById(b1.getExpressOrderId())); boolean refundableStatusProduct = false; - if(b1.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000)){ + if(b1.getProduct()!=null && b1.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000)){ refundableStatusProduct = true; - }else if(!b1.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1")){ + }else if(b1.getProduct()!=null && !b1.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1")){ refundableStatusProduct = true; } refundableStatusArr[i] = refundableStatusProduct; @@ -569,9 +569,9 @@ public class BuyOrderServiceImpl extends ServiceImpl impl bb.setRecordId(userRecord.getId()); } boolean refundableStatusProduct = false; - if (bb.getProduct().getGoodsType().equals("05") && paymentDateTime > timestamp - 7 * 24 * 60 * 60 * 1000) { + if (bb.getProduct()!=null && bb.getProduct().getGoodsType().equals("05") && paymentDateTime > timestamp - 7 * 24 * 60 * 60 * 1000) { refundableStatusProduct = true; - } else if (!bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals(Constants.ORDER_STATUS_TO_BE_SHIPPED)){ + } else if (bb.getProduct()!=null && !bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals(Constants.ORDER_STATUS_TO_BE_SHIPPED)){ refundableStatusProduct = true; } refundableStatusArr[i] = refundableStatusProduct; diff --git a/src/main/java/com/peanut/modules/common/service/impl/BuyOrderServiceImpl.java b/src/main/java/com/peanut/modules/common/service/impl/BuyOrderServiceImpl.java index fe0f713..2b1befa 100644 --- a/src/main/java/com/peanut/modules/common/service/impl/BuyOrderServiceImpl.java +++ b/src/main/java/com/peanut/modules/common/service/impl/BuyOrderServiceImpl.java @@ -126,9 +126,9 @@ public class BuyOrderServiceImpl extends ServiceImpl impl w.disableLogicDel().eq(ShopProduct::getProductId,bb.getProductId()); bb.setProduct(shopProductDao.selectOne(w)); boolean refundableStatusProduct = false; - if(bb.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000)){ + if(bb.getProduct()!=null && bb.getProduct().getGoodsType().equals("05") && (paymentDateTime > timestamp-7*24*60*60*1000)){ refundableStatusProduct = true; - }else if(!bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1")){ + }else if(bb.getProduct()!=null && !bb.getProduct().getGoodsType().equals("05") && b.getOrderStatus().equals("1")){ refundableStatusProduct = true; } refundableStatusArr[i] = refundableStatusProduct;