diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 536e289..a3f6cc2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -715,11 +715,11 @@ public class AppController extends BaseController for (Map.Entry entry : ((JSONObject) obj).entrySet()) { // 如果key包含在图片 if (imageKeys.contains(entry.getKey())) { - System.out.println(entry.getKey()); String imageStr = null; String imageKey = null; if (entry.getValue() instanceof JSONObject) { - if (null != ((JSONObject) entry.getValue()).getString("bar")) { + logger.info("entry key is {}", entry.getKey()); + if (entry.getKey().contains("avg")) { imageStr = ((JSONObject) entry.getValue()).getString("bar"); imageKey = "bar"; } else { @@ -727,8 +727,9 @@ public class AppController extends BaseController imageKey = "v"; } } - if (null != imageStr && !"".equals(imageStr) && null != imageKey && !"".equals(imageKey)) { + if (null != imageStr && !"".equals(imageStr)) { // 将base64转为图片存在服务器,并将返回值置空 + logger.info("image name is '{}', image str is '{}'", entry.getKey(), imageStr); String path = FileUtils.GenerateImage(imageStr, entry.getKey()); TImage tImage = new TImage(); tImage.setName(entry.getKey());