mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-07 14:18:05 +08:00
🐛 fix #2043
This commit is contained in:
parent
ce504c2a3e
commit
c3865e02c7
@ -409,12 +409,14 @@ public class Condition extends CloneSupport<Condition> {
|
|||||||
conditionStrBuilder.append(" (");
|
conditionStrBuilder.append(" (");
|
||||||
final Object value = this.value;
|
final Object value = this.value;
|
||||||
if (isPlaceHolder()) {
|
if (isPlaceHolder()) {
|
||||||
List<?> valuesForIn;
|
Collection<?> valuesForIn;
|
||||||
// 占位符对应值列表
|
// 占位符对应值列表
|
||||||
if (value instanceof CharSequence) {
|
if (value instanceof CharSequence) {
|
||||||
valuesForIn = StrUtil.split((CharSequence) value, ',');
|
valuesForIn = StrUtil.split((CharSequence) value, ',');
|
||||||
|
} else if (value instanceof Collection) {
|
||||||
|
valuesForIn = (Collection<?>) value;
|
||||||
} else {
|
} else {
|
||||||
valuesForIn = Arrays.asList(Convert.convert(String[].class, value));
|
valuesForIn = Arrays.asList(Convert.convert(Object[].class, value));
|
||||||
}
|
}
|
||||||
conditionStrBuilder.append(StrUtil.repeatAndJoin("?", valuesForIn.size(), ","));
|
conditionStrBuilder.append(StrUtil.repeatAndJoin("?", valuesForIn.size(), ","));
|
||||||
if (null != paramValues) {
|
if (null != paramValues) {
|
||||||
|
Loading…
Reference in New Issue
Block a user