reghao 2 years ago
parent
commit
08001d718d

+ 6 - 0
jdk/src/main/java/cn/reghao/jutil/jdk/db/PageList.java

@@ -78,10 +78,16 @@ public class PageList<T> {
         return list;
     }
 
+    @Deprecated
     public static <T> PageList<T> empty(int pageNumber, int pageSize) {
         return new PageList<>(pageNumber, pageSize);
     }
 
+    public static <T> PageList<T> empty() {
+        return new PageList<>(1, 10, 0, Collections.emptyList());
+    }
+
+    @Deprecated
     public static <T> PageList<T> pageList(List<T> list) {
         return new PageList<>(1, 10, 0, Collections.emptyList());
     }

+ 3 - 1
jdk/src/main/java/cn/reghao/jutil/jdk/result/WebResult.java

@@ -3,6 +3,8 @@ package cn.reghao.jutil.jdk.result;
 import cn.reghao.jutil.jdk.converter.DateTimeConverter;
 import cn.reghao.jutil.jdk.serializer.JsonConverter;
 
+import java.util.UUID;
+
 /**
  * HTTP 响应 body 数据
  *
@@ -20,7 +22,7 @@ public class WebResult<T> {
         this.code = code;
         this.msg = msg;
         this.timestamp = System.currentTimeMillis();
-        this.requestId = "";
+        this.requestId = UUID.randomUUID().toString().replace("-", "");
     }
 
     public int getCode() {