From a60332d51fec0ae9f1afecc8c7a018c77e4ac101 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期二, 27 二月 2024 10:03:29 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java
index 8af19e3..16d5841 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java
@@ -19,30 +19,25 @@
      * 姣忛〉鏄剧ず鐨勮褰曟暟
      */
     @Schema(description = "姣忛〉璁板綍鏁�")
-    @Builder.Default
-    public Integer pageSize = 0 ;
+    public Integer pageSize ;
     /**
      * 璁板綍鎬绘暟
      */
     @Schema(description = "璁板綍鎬绘暟")
-    @Builder.Default
-    public Long itemTotal = 0L;
+    public Long itemTotal ;
     /**
      * 褰撳墠椤�
      */
     @Schema(description = "褰撳墠椤�")
-    @Builder.Default
-    public Integer pageCurr = 0;
+    public Integer pageCurr ;
     /**
      * 鎬婚〉鏁�
      */
     @Schema(description = "鎬婚〉鏁�")
-    @Builder.Default
-    public Integer pageTotal = 0;
+    public Integer pageTotal ;
 
     @Schema(description = "鏁版嵁")
-    @Builder.Default
-    public T content = null;
+    public T obj;
 
     /**
      * 鏌ヨ寮�濮嬭褰�
@@ -62,18 +57,27 @@
     public void calculateAndSet(Long itemTotal, Map<String, Object> params) {
         this.itemTotal = itemTotal ;
         if(this.itemTotal == null){
-            itemTotal = 0L ;
+            this.itemTotal = 0L ;
         }
 
-        if (pageSize < 1) {
-            pageSize = 1;
+        if(this.itemTotal == 0){
+            this.pageSize = 1 ;
         }
-        pageTotal = (int)Math.ceil((double)itemTotal/pageSize);
+        if(this.pageSize == null || this.pageSize <= 0){
+            /**
+             * 鏈卞疂姘� 2024-01-30 淇敼
+             * 鏈紶鍏ュ垎椤靛弬鏁版椂锛屽彇鍏ㄩ儴璁板綍
+             */
+            //this.pageSize = 1 ;//渚涗笅闈綔涓洪櫎鏁�
+            this.pageSize = 10000 ;//渚涗笅闈綔涓洪櫎鏁�
+        }
+
+        pageTotal = (int)Math.ceil((itemTotal==null?0.0D:itemTotal.doubleValue())/pageSize);
 
         if (pageTotal == 0) {
             pageTotal = 1;
         }
-        if (pageCurr < 1) {
+        if (pageCurr == null || pageCurr < 1) {
             pageCurr = 1;
         }
         if (pageCurr > pageTotal) {
@@ -84,8 +88,8 @@
         this.queryStart = (this.pageCurr - 1) * this.pageSize ;
         this.queryCount = this.pageSize ;
 
-        params.put("queryStart", this.queryStart) ;
-        params.put("queryCount", this.queryCount) ;
+        params.put("start", this.queryStart) ;
+        params.put("count", this.queryCount) ;
     }
 
 }

--
Gitblit v1.8.0