修复NamedSql中in没有判断大小写问题

This commit is contained in:
Looly 2022-12-11 13:50:51 +08:00
parent e22cfdb8c9
commit 78a26c0f14
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@
-------------------------------------------------------------------------------------------------------------
# 5.8.11.M1 (2022-12-05)
# 5.8.11.M1 (2022-12-11)
### 🐣新特性
* 【core 】 CharUtil.isBlankChar增加\u180epr#2738@Github
@ -19,6 +19,7 @@
* 【core 】 修复BiMap中未重写computeIfAbsent和putIfAbsent导致双向查找出问题issue#I62X8O@Gitee
* 【json 】 修复JSON解析栈溢出部分问题issue#2746@Github
* 【json 】 修复getMultistageReverseProxyIp未去除空格问题issue#I64P9J@Gitee
* 【db 】 修复NamedSql中in没有判断大小写问题issue#2792@Github
-------------------------------------------------------------------------------------------------------------

View File

@ -138,7 +138,7 @@ public class NamedSql {
if(paramMap.containsKey(nameStr)) {
// 有变量对应值值可以为null替换占位符为?变量值放入相应index位置
final Object paramValue = paramMap.get(nameStr);
if(ArrayUtil.isArray(paramValue) && StrUtil.contains(sqlBuilder, "in")){
if(ArrayUtil.isArray(paramValue) && StrUtil.containsIgnoreCase(sqlBuilder, "in")){
// 可能为select in (xxx)语句则拆分参数为多个参数变成in (?,?,?)
final int length = ArrayUtil.length(paramValue);
for (int i = 0; i < length; i++) {