From 52dff0802db6bc1cf90717603f32ccf867fbcb23 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期三, 12 十月 2022 09:42:33 +0800
Subject: [PATCH] token服务修改

---
 src/main/resources/mapper/sys/TokenMapper.xml |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/sys/TokenMapper.xml b/src/main/resources/mapper/sys/TokenMapper.xml
index c369c3a..ed88efd 100644
--- a/src/main/resources/mapper/sys/TokenMapper.xml
+++ b/src/main/resources/mapper/sys/TokenMapper.xml
@@ -13,8 +13,13 @@
     <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String">
         select count(*) from lf.sys_token
         <where>
-            <if test="token != null">
-                token = #{token}
+            1=1
+            <if test="name != null">
+                and token = #{name}
+            </if>
+
+            <if test="type != null">
+                and type = #{type}
             </if>
         </where>
     </select>
@@ -23,8 +28,13 @@
     <select id="selectByPage" resultMap="resultMap" resultType="com.lf.server.entity.sys.TokenEntity">
         select * from lf.sys_token
         <where>
-            <if test="token != null">
-                token = #{token}
+            1=1
+            <if test="name != null">
+                and token = #{name}
+            </if>
+
+            <if test="type != null">
+                and type = #{type}
             </if>
         </where>
         order by id

--
Gitblit v1.9.3