From a1e67a0b1bb0b60f87d2db7db17ec1b093e3b73e Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期五, 19 四月 2024 11:04:44 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/MatMapper.xml | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/MatMapper.xml b/src/main/resources/mapper/MatMapper.xml
index 4ba3595..b405ce5 100644
--- a/src/main/resources/mapper/MatMapper.xml
+++ b/src/main/resources/mapper/MatMapper.xml
@@ -76,4 +76,21 @@
<select id="selectByMatnr" resultMap="BaseResultMap">
select top 1 * from man_mat where 1=1 and matnr = #{matnr}
</select>
+ <select id="selectAllPage" resultMap="BaseResultMap">
+ select * from
+ (
+ SELECT
+ ROW_NUMBER() over (order by v.matnr desc) as row,
+ v.*
+ FROM man_mat v
+ WHERE 1=1
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+ <select id="selectAllPageSize" resultType="java.lang.Integer">
+ select
+ count(1)
+ FROM man_mat v
+ WHERE 1=1
+
+ </select>
</mapper>
--
Gitblit v1.9.1