Commit b1256682 authored by yanzg's avatar yanzg

压缩视频

parent 87e4264f
......@@ -73,20 +73,14 @@ public class StringHelper {
if (val == null) {
return true;
}
boolean isArray = val instanceof List || val.getClass().isArray();
// 判断是否属于数组
boolean isArray = ArrayHelper.isArrayOrList(val);
// 不是数组,则为常规值
if (!isArray) {
return false;
}
List list;
// 判断处理
if (val instanceof List) {
list = (List) val;
} else {
Object[] arr = (Object[]) val;
list = Arrays.asList(arr);
}
int length = list.size();
return length == 0;
List list = ArrayHelper.getList(val);
return list.isEmpty();
}
/**
......
......@@ -2,6 +2,7 @@ package com.yanzuoguang.dao.cond;
import com.yanzuoguang.dao.impl.SqlDataField;
import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.helper.ArrayHelper;
import com.yanzuoguang.util.helper.StringHelper;
import java.util.Arrays;
......@@ -43,12 +44,15 @@ public class SqlCondEquals extends SqlCondBase<SqlCondEquals> {
if (StringHelper.isEmpty(val) || StringHelper.isEmptyArray(val)) {
continue;
}
if (StringHelper.compare(val, this.val)) {
List list = ArrayHelper.getList(val);
for (Object item : list) {
if (StringHelper.compare(item, this.val)) {
// 只要有值不为空,则条件满足
return COND_TYPE_CODE_COND;
}
}
}
}
return COND_TYPE_NONE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment