From 1ff17fd97a85cd191467b4a2ffe0e4b7b1959af5 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期日, 12 十一月 2023 17:00:25 +0800
Subject: [PATCH] 查询用户同时得到其对应的多个角色,采用积极关联查询方式

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaBlockMapper.xml |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaBlockMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaBlockMapper.xml
index c7da490..3b87acc 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaBlockMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaBlockMapper.xml
@@ -23,25 +23,24 @@
     from ba_block
     where id = #{id,jdbcType=BIGINT}
   </select>
-  <select id="selectTotal" parameterType="java.lang.Long" resultType="java.lang.Long">
-    <!--@mbg.generated-->
+  <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long">
     select
     count(*)
     from ba_block
-    <trim prefix="where ">
-      <if test="name != null">
-        name like '%#{name,jdbcType=VARCHAR}%' and
-      </if>
-      <if test="header != null">
-        header = '#{header,jdbcType=VARCHAR}' and
-      </if>
-      <if test="phone != null">
-        phone = '#{phone,jdbcType=VARCHAR}' and
-      </if>
-      <if test="area != null">
-        area = #{area,jdbcType=INTEGER}
-      </if>
-    </trim>
+      <trim prefix="where ">
+        <if test="name != null">
+          name like '%#{name,jdbcType=VARCHAR}%' and
+        </if>
+        <if test="header != null">
+          header = '#{header,jdbcType=VARCHAR}' and
+        </if>
+        <if test="phone != null">
+          phone = '#{phone,jdbcType=VARCHAR}' and
+        </if>
+        <if test="area != null">
+          area = #{area,jdbcType=INTEGER}
+        </if>
+      </trim>
   </select>
   <select id="selectSome" parameterType="java.util.Map" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -62,9 +61,10 @@
         area = #{area,jdbcType=INTEGER}
       </if>
     </trim>
+    order by id DESC
     <trim prefix="limit " >
-      <if test="queryStart != null and queryCount != null">
-        #{queryStart}, #{queryCount}
+      <if test="start != null and count != null">
+        #{start}, #{count}
       </if>
     </trim>
   </select>

--
Gitblit v1.8.0