From 17f0c4d68b1770e490a6acd70cd769eebae4cd8f Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 24 四月 2024 16:38:09 +0800
Subject: [PATCH] 1、封装生成二维码的公共类; 2、实现生成标识类二维码。

---
 pms-parent/pms-global/src/main/resources/mapper/BaLogMapper.xml |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/pms-parent/pms-global/src/main/resources/mapper/BaLogMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/BaLogMapper.xml
index 48010d6..c7cd531 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/BaLogMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/BaLogMapper.xml
@@ -68,8 +68,7 @@
       <property name="alias" value="r"/>
     </include>
     from ba_log r
-    where
-    <trim prefix="and" suffixOverrides="and">
+    <trim prefix="where " suffixOverrides="and">
       <if test="userId != null and userId != ''">
         user_id = #{userId,jdbcType=BIGINT} and
       </if>
@@ -83,11 +82,30 @@
         res_ip =#{resIp,jdbcType=VARCHAR} and
       </if>
     </trim>
-    order by id DESC
+    order by id desc
     <trim prefix="limit " >
       <if test="start != null and count != null">
         #{start}, #{count}
       </if>
     </trim>
   </select>
+
+  <select id="selectSomeCount" resultType="java.lang.Long">
+    select count(1)
+    from ba_log r
+    <trim prefix="where " suffixOverrides="and">
+      <if test="userId != null and userId != ''">
+        user_id = #{userId,jdbcType=BIGINT} and
+      </if>
+      <if test="content != null  and content != '' ">
+        content like concat('%', #{content}, '%') and
+      </if>
+      <if test="createDt != null and createDt != '' ">
+        create_dt = #{createDt,jdbcType=TIMESTAMP} and
+      </if>
+      <if test="resIp != null and resIp != '' ">
+        res_ip =#{resIp,jdbcType=VARCHAR} and
+      </if>
+    </trim>
+  </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0