From 5292c35a78a762b2d7fd1fe664f5aa1889afe2f6 Mon Sep 17 00:00:00 2001 From: zhangcl Date: Tue, 16 Aug 2022 14:37:37 +0800 Subject: [PATCH] removeBase64Image --- .../web/controller/api/AppController.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) 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 fedc443..d868607 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 @@ -29,6 +29,7 @@ import sun.misc.BASE64Decoder; import javax.annotation.Resource; import java.lang.reflect.Field; +import java.util.ArrayList; import java.util.List; /** @@ -360,6 +361,40 @@ public class AppController extends BaseController return jsonObject; } + public JSONObject removeBase64Image(JSONObject jsonObject,Long recordId) + { + String []keys={"image_sz","image_sz_yudian","image_sz_yuban","image_sz_liewen","image_st","image_sx","image_sx_vein"}; + List parents=new ArrayList<>(); + try + { + parents.add(jsonObject.getJSONObject("data").getJSONObject("shezhi").getJSONObject("shemian")); + parents.add(jsonObject.getJSONObject("data").getJSONObject("shezhi").getJSONObject("yudian")); + parents.add(jsonObject.getJSONObject("data").getJSONObject("shezhi").getJSONObject("yuban")); + parents.add(jsonObject.getJSONObject("data").getJSONObject("shezhi").getJSONObject("liewen")); + parents.add(jsonObject.getJSONObject("data").getJSONObject("shetai")); + parents.add(jsonObject.getJSONObject("data").getJSONObject("shexia")); + parents.add(jsonObject.getJSONObject("data").getJSONObject("shexia")); + + for (int i=0;i