From baedf074be617711feb989bad2d4c4424d6e907c Mon Sep 17 00:00:00 2001 From: Loki <654612@qq.com> Date: Wed, 7 Dec 2022 10:38:29 +0800 Subject: [PATCH] =?UTF-8?q?:+1:=20=E5=A2=9E=E5=8A=A0NPE=E9=98=B2=E5=BE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/server/YudaoServerApplication.java | 10 --------- .../service/impl/YxStoreOrderServiceImpl.java | 21 ++++++++++++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java b/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java index ae3f8f2c..689c2c30 100644 --- a/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java +++ b/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java @@ -16,16 +16,6 @@ import java.io.File; public class YudaoServerApplication { public static void main(String[] args) { - - ApplicationHome home = new ApplicationHome(YudaoServerApplication.class); - File jarFile = home.getSource(); - String dirPath = jarFile.getParentFile().toString(); - String filePath = dirPath + File.separator + ".dubbo"; - System.out.println(filePath); - - System.setProperty("dubbo.meta.cache.filePath", filePath); - System.setProperty("dubbo.mapping.cache.filePath",filePath); - SpringApplication.run(YudaoServerApplication.class, args); } diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java index 43a05305..04a668c3 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java @@ -2773,6 +2773,12 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl{ + if (ObjectUtil.isEmpty(c.getCartInfoMap())){ + return; + } + if (!c.getCartInfoMap().containsKey("productInfo")){ + return; + } Object info = c.getCartInfoMap().get("productInfo"); YxStoreProductQueryVo vo = JSONUtil.toBean(info.toString(), YxStoreProductQueryVo.class); if (ObjectUtil.isNotEmpty(vo)) { @@ -2783,14 +2789,19 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl