yzc vor 2 Jahren
Ursprung
Commit
23d61f1fe5

+ 5 - 3
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -150,9 +150,11 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
         ObsFileUtil.saveFile(productInfoDto.getFileList(), productInfoDto.getId());
         //处理维多利亚扩展
         String victoriatouristJson = productInfoDto.getVictoriatouristJson();
-        JSONObject json = JSONObject.parseObject(victoriatouristJson);
-        json.put("deptId", SecurityUtils.getDeptId());
-        productInfoDto.setVictoriatouristJson(json.toJSONString());
+        if(ObjectUtil.isNotEmpty(victoriatouristJson)) {
+            JSONObject json = JSONObject.parseObject(victoriatouristJson);
+            json.put("deptId", SecurityUtils.getDeptId());
+            productInfoDto.setVictoriatouristJson(json.toJSONString());
+        }
     }
 
     @GlobalTransactional(rollbackFor = Exception.class)