Commit b1256682 authored by yanzg's avatar yanzg

压缩视频

parent 87e4264f
...@@ -73,20 +73,14 @@ public class StringHelper { ...@@ -73,20 +73,14 @@ public class StringHelper {
if (val == null) { if (val == null) {
return true; return true;
} }
boolean isArray = val instanceof List || val.getClass().isArray(); // 判断是否属于数组
boolean isArray = ArrayHelper.isArrayOrList(val);
// 不是数组,则为常规值
if (!isArray) { if (!isArray) {
return false; return false;
} }
List list; List list = ArrayHelper.getList(val);
// 判断处理 return list.isEmpty();
if (val instanceof List) {
list = (List) val;
} else {
Object[] arr = (Object[]) val;
list = Arrays.asList(arr);
}
int length = list.size();
return length == 0;
} }
/** /**
......
...@@ -2,6 +2,7 @@ package com.yanzuoguang.dao.cond; ...@@ -2,6 +2,7 @@ package com.yanzuoguang.dao.cond;
import com.yanzuoguang.dao.impl.SqlDataField; import com.yanzuoguang.dao.impl.SqlDataField;
import com.yanzuoguang.util.base.ObjectHelper; import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.helper.ArrayHelper;
import com.yanzuoguang.util.helper.StringHelper; import com.yanzuoguang.util.helper.StringHelper;
import java.util.Arrays; import java.util.Arrays;
...@@ -43,12 +44,15 @@ public class SqlCondEquals extends SqlCondBase<SqlCondEquals> { ...@@ -43,12 +44,15 @@ public class SqlCondEquals extends SqlCondBase<SqlCondEquals> {
if (StringHelper.isEmpty(val) || StringHelper.isEmptyArray(val)) { if (StringHelper.isEmpty(val) || StringHelper.isEmptyArray(val)) {
continue; 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_CODE_COND;
} }
} }
} }
}
return COND_TYPE_NONE; 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