Merge pull request #2046 from yeternallove/v5-dev

🐛 fix #2043
This commit is contained in:
Golden Looly 2021-12-29 07:30:56 +08:00 committed by GitHub
commit e18bbdd741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -409,12 +409,14 @@ public class Condition extends CloneSupport<Condition> {
conditionStrBuilder.append(" (");
final Object value = this.value;
if (isPlaceHolder()) {
List<?> valuesForIn;
Collection<?> valuesForIn;
// 占位符对应值列表
if (value instanceof CharSequence) {
valuesForIn = StrUtil.split((CharSequence) value, ',');
} else if (value instanceof Collection) {
valuesForIn = (Collection<?>) value;
} else {
valuesForIn = Arrays.asList(Convert.convert(String[].class, value));
valuesForIn = Arrays.asList(Convert.convert(Object[].class, value));
}
conditionStrBuilder.append(StrUtil.repeatAndJoin("?", valuesForIn.size(), ","));
if (null != paramValues) {