From 84569abda51ecf6c5549dec4cadee8d043422379 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 30 九月 2025 09:33:28 +0800
Subject: [PATCH] 2025.9.30

---
 src/main/kotlin/com/flightfeather/grid/web/BaseResPack.kt |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/grid/web/BaseResPack.kt b/src/main/kotlin/com/flightfeather/grid/web/BaseResPack.kt
index 38f3a53..3ce43d2 100644
--- a/src/main/kotlin/com/flightfeather/grid/web/BaseResPack.kt
+++ b/src/main/kotlin/com/flightfeather/grid/web/BaseResPack.kt
@@ -3,6 +3,7 @@
 import com.flightfeather.grid.config.exception.BizException
 import com.flightfeather.grid.vo.BaseResponse
 import com.flightfeather.grid.vo.DataHead
+import com.github.pagehelper.Page
 
 
 /**
@@ -24,4 +25,11 @@
     } catch (e: BizException) {
         BaseResponse(false, message = e.message ?: "")
     }
+}
+
+/**
+ * 鍖呰甯︽湁鍒嗛〉鐨勮繑鍥炵粨鏋�
+ */
+fun <T> responsePack(p: Page<T>): Pair<DataHead, List<T?>> {
+    return DataHead(p.pageNum, p.pages, p.total) to p.result
 }
\ No newline at end of file

--
Gitblit v1.9.3