You've already forked FrameTour-BE
refactor(video): 移除模板占位符检查逻辑
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good
- 删除了模板占位符验证相关代码 - 简化了设备计数逻辑 - 移除了不必要的模板占位符列表操作
This commit is contained in:
@@ -91,17 +91,13 @@ public class VideoTaskRepository {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
AtomicInteger deviceCount = new AtomicInteger();
|
AtomicInteger deviceCount = new AtomicInteger();
|
||||||
List<String> templatePlaceholder = templateRepository.getTemplatePlaceholder(task.getTemplateId());
|
|
||||||
paramJson.entrySet().stream()
|
paramJson.entrySet().stream()
|
||||||
.filter(entry -> StringUtils.isNumeric(entry.getKey()))
|
.filter(entry -> StringUtils.isNumeric(entry.getKey()))
|
||||||
.forEach(entry -> {
|
.forEach(entry -> {
|
||||||
List<Object> jsonArray = JacksonUtil.parseArray(JacksonUtil.toJSONString(entry.getValue()), Object.class);
|
List<Object> jsonArray = JacksonUtil.parseArray(JacksonUtil.toJSONString(entry.getValue()), Object.class);
|
||||||
if (jsonArray != null && !jsonArray.isEmpty()) {
|
if (jsonArray != null && !jsonArray.isEmpty()) {
|
||||||
for (Object ignored : jsonArray) {
|
for (Object ignored : jsonArray) {
|
||||||
if (templatePlaceholder.contains(entry.getKey())) {
|
deviceCount.getAndIncrement();
|
||||||
deviceCount.getAndIncrement();
|
|
||||||
templatePlaceholder.remove(entry.getKey());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user