diff --git a/service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java b/service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java index 431c19e..308d8d5 100644 --- a/service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java +++ b/service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java @@ -534,8 +534,8 @@ public class JdServiceImpl implements JdService { // 查询规格 GoodsSpecs specs = goodsSpecsService.queryDetailByThirdId(goodsMsg.getThirdId()); - if (specs != null) { - if (specs.getAutomaticPrice() == 1) { + if (specs != null && specs.getThirdId() != null) { + if (specs.getAutomaticPrice() != null && specs.getAutomaticPrice() == 1) { // 根据skuId 查询商品详情 // 根据skuId 查询商品售价 @@ -560,7 +560,6 @@ public class JdServiceImpl implements JdService { goodsSpecsService.update(specs); } } - } @Override