fix: 优化视频接口报错
This commit is contained in:
parent
ca1a9f75a6
commit
b329d475c8
@ -45,7 +45,8 @@ public interface MicroservicDynamicSQLMapper<T> {
|
|||||||
default <R> List<R> getAllListWithResultType(String sql,
|
default <R> List<R> getAllListWithResultType(String sql,
|
||||||
Map<String, Object> map,
|
Map<String, Object> map,
|
||||||
Class<R> resultType) {
|
Class<R> resultType) {
|
||||||
return convertList(getAllList(sql, map), resultType);
|
List<Map<String, Object>> allList = getAllList(sql, map);
|
||||||
|
return convertList(allList, resultType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Select({"select count(1) count from ${sql} and ${ew.sqlSegment}"})
|
@Select({"select count(1) count from ${sql} and ${ew.sqlSegment}"})
|
||||||
|
|||||||
@ -1179,27 +1179,34 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
|||||||
|
|
||||||
private List<Object> normalizeValues(Object value) {
|
private List<Object> normalizeValues(Object value) {
|
||||||
List<Object> values = new ArrayList<>();
|
List<Object> values = new ArrayList<>();
|
||||||
|
appendNormalizedValues(values, value);
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void appendNormalizedValues(List<Object> values, Object value) {
|
||||||
|
if (value == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (value instanceof List<?> list) {
|
if (value instanceof List<?> list) {
|
||||||
for (Object item : list) {
|
for (Object item : list) {
|
||||||
if (item != null) {
|
appendNormalizedValues(values, item);
|
||||||
values.add(item);
|
|
||||||
}
|
}
|
||||||
}
|
return;
|
||||||
return values;
|
|
||||||
}
|
}
|
||||||
if (value instanceof Object[] array) {
|
if (value instanceof Object[] array) {
|
||||||
for (Object item : array) {
|
for (Object item : array) {
|
||||||
if (item != null) {
|
appendNormalizedValues(values, item);
|
||||||
values.add(item);
|
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return values;
|
if (value instanceof String text) {
|
||||||
|
if (StrUtil.isNotBlank(text)) {
|
||||||
|
values.add(text);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (value != null) {
|
|
||||||
values.add(value);
|
values.add(value);
|
||||||
}
|
}
|
||||||
return values;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String mapVdTreeColumn(String field) {
|
private String mapVdTreeColumn(String field) {
|
||||||
if (StrUtil.isBlank(field)) {
|
if (StrUtil.isBlank(field)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user