From 6f906b70ac1b18fb9c0f10620318981ced79f8e1 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 27 八月 2021 10:30:26 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/WaitMatinMapper.xml |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/main/resources/mapper/WaitMatinMapper.xml b/src/main/resources/mapper/WaitMatinMapper.xml
index 02eafe9..d0c09ab 100644
--- a/src/main/resources/mapper/WaitMatinMapper.xml
+++ b/src/main/resources/mapper/WaitMatinMapper.xml
@@ -51,20 +51,26 @@
     <select id="getHeadPage" resultMap="BaseResultMap">
         select * from
         (
-        select distinct bill_no, bill_type, appe_time,
-        ROW_NUMBER() over (order by appe_time) as row
-        from ints_wait_matin
-        <include refid="condition"></include>
+            select *,
+            ROW_NUMBER() over (order by appe_time) as row
+            from (
+                select distinct bill_no, bill_type, appe_time
+                from ints_wait_matin
+                <include refid="condition"></include>
+            ) r
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
 
     <select id="getHeadPageCount" parameterType="java.util.Map" resultType="java.lang.Integer">
         select count(1) from
         (
-        select distinct bill_no, bill_type, appe_time,
-        ROW_NUMBER() over (order by appe_time) as row
-        from ints_wait_matin
-        <include refid="condition"></include>
+            select *,
+            ROW_NUMBER() over (order by appe_time) as row
+            from (
+                select distinct bill_no, bill_type, appe_time
+                from ints_wait_matin
+                <include refid="condition"></include>
+            ) r
         ) t
     </select>
 

--
Gitblit v1.9.1