瀏覽代碼

excel优化

guarantee-lsq 2 年之前
父節點
當前提交
f57f8bee75
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

+ 1 - 1
platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

@@ -2271,7 +2271,7 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
                         Method requestMethod = clazz.getMethod(getGetMethod(field.getName()));
                         Object requestVal = requestMethod.invoke(vo);
                         Excel excel = field.getAnnotation(Excel.class);
-                        if (excel != null && excel.styleType() == 1) {
+                        if (excel != null && excel.styleType() == 1 && requestVal != null) {
                             // 拼接自定义字符串
                             paramList.append("{\"name\":\"").append(excel.name()).append("\",");
                             paramList.append("\"content\":\"").append(requestVal).append("\"},");