fix: 优化视频接口报错

This commit is contained in:
tangwei 2026-06-25 18:00:28 +08:00
parent ca1a9f75a6
commit b329d475c8
2 changed files with 20 additions and 12 deletions

View File

@ -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}"})

View File

@ -1179,26 +1179,33 @@ 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 values;
return;
}
if (value != null) {
values.add(value);
if (value instanceof String text) {
if (StrUtil.isNotBlank(text)) {
values.add(text);
}
return;
}
return values;
values.add(value);
}
private String mapVdTreeColumn(String field) {