lyhzzz hace 2 años
padre
commit
6563ff52cf
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      src/main/java/com/fdkankan/sale/util/MyExcelUtil.java

+ 4 - 1
src/main/java/com/fdkankan/sale/util/MyExcelUtil.java

@@ -2,6 +2,7 @@ package com.fdkankan.sale.util;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.sale.common.CacheUtil;
 import com.fdkankan.sale.common.FilePath;
@@ -103,6 +104,9 @@ public class MyExcelUtil {
     private void imageHandleByParam(Map<String, Object> param) {
         for (Map.Entry<String, Object> entry : param.entrySet()) {
             String mapKey = entry.getKey();
+            if(ObjectUtil.isNull(entry.getValue())){
+                continue;
+            }
             String ossPath = entry.getValue().toString();
             String downloadPath = FilePath.file_path + ossPath.replaceAll(CacheUtil.host,"");
             try {
@@ -132,5 +136,4 @@ public class MyExcelUtil {
     }
 
 
-
 }