Browse Source

返回结果处理逻辑调整

yangyue 1 month ago
parent
commit
8ac778bf6b

+ 6 - 0
zwww-service/src/main/java/cn/com/taiji/dataService/utils/ResultHandle.java

@@ -27,6 +27,12 @@ public class ResultHandle {
             int count = t.getRoot().getResults().getCount();
             if(count>0){
                 String result = t.getRoot().getResults().getResult();
+                if(count==1){
+                    com.alibaba.fastjson.JSONObject object = JSON.parseObject(result);
+                    JSONArray jsonArray = new JSONArray();
+                    jsonArray.add(object);
+                    return jsonArray;
+                }
                 JSONArray jsonArray = JSON.parseArray(result);
 
                 return  jsonArray;