From cacc23bebd7cb919c3df11866161a0424ea84fa8 Mon Sep 17 00:00:00 2001 From: ANDRU-PC\Andru <769883346@qq.com> Date: 星期四, 21 七月 2022 18:24:37 +0800 Subject: [PATCH] 转换方法调整 --- src/main/java/com/hx/resultTool/Result.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/hx/resultTool/Result.java b/src/main/java/com/hx/resultTool/Result.java index 42597c0..5c696b0 100644 --- a/src/main/java/com/hx/resultTool/Result.java +++ b/src/main/java/com/hx/resultTool/Result.java @@ -6,6 +6,7 @@ import com.hx.exception.TipsException; import java.io.Serializable; +import java.util.List; /** * 缁熶竴杩斿洖鏍煎紡 @@ -90,8 +91,8 @@ } /**杩斿洖鏁版嵁杞垪琛�*/ - public <T> T getArray(Object data, Class<T> clazz) { - return JSONArray.parseObject(JSON.toJSONString(data), clazz); + public <T> List<T> getArray(Object data, Class<T> clazz) { + return JSONArray.parseArray(JSON.toJSONString(data), clazz); } /*******************************************************************************/ -- Gitblit v1.8.0