From 85ce0fa8006e3290447ae0e78783b353f7a3e8f6 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 17 十一月 2023 10:05:47 +0800
Subject: [PATCH] 查询条件中like语法错误修改

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml
index be5f478..0a73af3 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml
@@ -65,7 +65,7 @@
                 blockId = #{blockId,jdbcType=BIGINT} and
             </if>
             <if test="name != null">
-                name like '%#{name,jdbcType=VARCHAR}%' and
+                name like concat('%', #{name}, '%') and
             </if>
             <if test="num != null">
                 num = '#{num,jdbcType=VARCHAR}' and
@@ -95,7 +95,7 @@
                 blockId = #{blockId,jdbcType=BIGINT} and
             </if>
             <if test="name != null">
-                name like '%#{name,jdbcType=VARCHAR}%' and
+                name like concat('%', #{name}, '%') and
             </if>
             <if test="num != null">
                 num = '#{num,jdbcType=VARCHAR}' and

--
Gitblit v1.8.0