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,
|
||||
Map<String, Object> map,
|
||||
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}"})
|
||||
|
||||
@ -1179,27 +1179,34 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
|
||||
private List<Object> normalizeValues(Object value) {
|
||||
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) {
|
||||
for (Object item : list) {
|
||||
if (item != null) {
|
||||
values.add(item);
|
||||
appendNormalizedValues(values, item);
|
||||
}
|
||||
}
|
||||
return values;
|
||||
return;
|
||||
}
|
||||
if (value instanceof Object[] array) {
|
||||
for (Object item : array) {
|
||||
if (item != null) {
|
||||
values.add(item);
|
||||
appendNormalizedValues(values, item);
|
||||
}
|
||||
return;
|
||||
}
|
||||
return values;
|
||||
if (value instanceof String text) {
|
||||
if (StrUtil.isNotBlank(text)) {
|
||||
values.add(text);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (value != null) {
|
||||
values.add(value);
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
private String mapVdTreeColumn(String field) {
|
||||
if (StrUtil.isBlank(field)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user