From 5cf45e866329428864bc1c3ec1a0f67ba282fc8a Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 07 三月 2023 18:20:55 +0800
Subject: [PATCH] update springboot 3.0.2 => 3.0.4 update easyexcel 3.2.0 => 3.2.1 update hutool 5.8.11 => 5.8.14 update redisson 3.19.2 => 3.20.0 update lombok 1.18.24 => 1.18.26 update maven-compiler-plugin 3.10.1 => 3.11.0 update maven-surefire-plugin 3.0.0-M7 => 3.0.0-M9

---
 ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataBaseHelper.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataBaseHelper.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataBaseHelper.java
index c090179..a93f865 100644
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataBaseHelper.java
+++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataBaseHelper.java
@@ -58,15 +58,15 @@
         String var = Convert.toStr(var1);
         if (dataBasyType == DataBaseType.SQL_SERVER) {
             // charindex(',100,' , ',0,100,101,') <> 0
-            return "charindex('," + var + ",' , ','+" + var2 + "+',') <> 0";
+            return "charindex(',%s,' , ','+%s+',') <> 0".formatted(var, var2);
         } else if (dataBasyType == DataBaseType.POSTGRE_SQL) {
             // (select position(',100,' in ',0,100,101,')) <> 0
-            return "(select position('," + var + ",' in ','||" + var2 + "||',')) <> 0";
+            return "(select position(',%s,' in ','||%s||',')) <> 0".formatted(var, var2);
         } else if (dataBasyType == DataBaseType.ORACLE) {
             // instr(',0,100,101,' , ',100,') <> 0
-            return "instr(','||" + var2 + "||',' , '," + var + ",') <> 0";
+            return "instr(','||%s||',' , ',%s,') <> 0".formatted(var2, var);
         }
         // find_in_set(100 , '0,100,101')
-        return "find_in_set(" + var + " , " + var2 + ") <> 0";
+        return "find_in_set(%s , %s) <> 0".formatted(var, var2);
     }
 }

--
Gitblit v1.9.3