ccj 11 hónapja
szülő
commit
371bb048a6

+ 5 - 5
src/main/java/com/zhaoliangsz/grainsearch/basic/advice/ResponseAdvice.java

@@ -50,10 +50,10 @@ public class ResponseAdvice implements ResponseBodyAdvice {
 //            return body;
 //        }
         // 如果不是统一响应格式,则进行包装
-        HashMap<String,Object> result = new HashMap<>();
-        result.put("code",200);
-        result.put("data",body);
-        result.put("msg","执行成功");
+//        HashMap<String,Object> result = new HashMap<>();
+//        result.put("code",200);
+//        result.put("data",body);
+//        result.put("msg","执行成功");
 //        if(body instanceof String){
 //            //将 HashMap 转换为 json 字符串
 //            try {
@@ -62,6 +62,6 @@ public class ResponseAdvice implements ResponseBodyAdvice {
 //                throw new RuntimeException(e);
 //            }
 //        }
-        return result;
+        return body;
     }
 }