This is an automated email from the ASF dual-hosted git repository.
hefengen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new a9210db16b fix admin: modify dict query sql. (#5375)
a9210db16b is described below
commit a9210db16bb8bd70aaa23078e11fbb911f8785bb
Author: b_mountain <[email protected]>
AuthorDate: Fri Dec 22 10:42:23 2023 +0800
fix admin: modify dict query sql. (#5375)
Co-authored-by: 刘进山 <[email protected]>
---
shenyu-admin/src/main/resources/mappers/shenyu-dict-sqlmap.xml | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/shenyu-admin/src/main/resources/mappers/shenyu-dict-sqlmap.xml
b/shenyu-admin/src/main/resources/mappers/shenyu-dict-sqlmap.xml
index 24fc29cc5e..7f736bbc38 100644
--- a/shenyu-admin/src/main/resources/mappers/shenyu-dict-sqlmap.xml
+++ b/shenyu-admin/src/main/resources/mappers/shenyu-dict-sqlmap.xml
@@ -237,10 +237,12 @@
AND `type` = #{type, jdbcType=VARCHAR}
</if>
<if test="dictCode != null and dictCode != ''">
- AND dict_code = #{dictCode, jdbcType=VARCHAR}
+ <bind name="dictCodeLike" value="('%' + dictCode + '%')"/>
+ AND dict_code LIKE #{dictCodeLike, jdbcType=VARCHAR}
</if>
<if test="dictName != null and dictName != ''">
- AND dict_name = #{dictName, jdbcType=VARCHAR}
+ <bind name="dictNameLike" value="('%' + dictName + '%')"/>
+ AND dict_name LIKE #{dictNameLike, jdbcType=VARCHAR}
</if>
</where>
</select>
@@ -255,7 +257,8 @@
AND `type` = #{type, jdbcType=VARCHAR}
</if>
<if test="dictCode != null and dictCode != ''">
- AND dict_code = #{dictCode, jdbcType=VARCHAR}
+ <bind name="dictCodeLike" value="('%' + dictCode + '%')"/>
+ AND dict_code LIKE #{dictCodeLike, jdbcType=VARCHAR}
</if>
<if test="dictName != null and dictName != ''">
<bind name="dictNameLike" value="('%' + dictName + '%')"/>