Browse Source

入参修改为object

andy 1 year ago
parent
commit
56417cef99
1 changed files with 13 additions and 1 deletions
  1. 13 1
      src/main/java/com/scbfkj/uni/library/XmlUtil.java

+ 13 - 1
src/main/java/com/scbfkj/uni/library/XmlUtil.java

@@ -74,10 +74,22 @@ public class XmlUtil {
     }
 
 
-    public static Map<String, Object> customMadeListxmlToMap(List<String> xmlList, boolean isTwoDimensionalization, Object noDiKaList, Map<String, String> translateName) {
+    public static Map<String, Object> customMadeListxmlToMap(List<String> xmlList, Object isTwoDimensionalizationObj, Object noDiKaList, Map<String, String> translateName) {
         if (Objects.isNull(xmlList) || xmlList.size() == 0) {
             return MapTools.processSuccess(null);
         }
+        boolean isTwoDimensionalization;
+        if(isTwoDimensionalizationObj instanceof String s){
+            if("1".equalsIgnoreCase(s) || "true".equalsIgnoreCase(s)){
+                isTwoDimensionalization = true;
+            } else {
+                isTwoDimensionalization = false;
+            }
+        }else if(isTwoDimensionalizationObj instanceof Boolean b){
+            isTwoDimensionalization = b;
+        } else {
+            isTwoDimensionalization = false;
+        }
         if (xmlList.size() == 1) {
             return customMadexmlToMap(xmlList.get(0), isTwoDimensionalization, noDiKaList, translateName);
         }