Commit 39305f55 authored by alex yao's avatar alex yao

refactor(scheduler): 优化软件著作权调度器代码结构

- 将并行流操作改为传统for循环以提高性能和可读性
- 修复JSON反序列化代码的格式问题,改善代码可维护性
- 保持原有业务逻辑不变,仅调整代码实现方式
parent 425da2ea
......@@ -130,9 +130,9 @@ public class SoftwareCopyRightScheduler {
bizSoftwareCopyrightService.findByExample(bizSoftwareCopyrightEntity, null);
if (CollectionUtils.isNotEmpty(bizSoftwareCopyrightEntities)) {
bizSoftwareCopyrightEntities.parallelStream().forEach(softwareCopyrightEntity -> {
for (BizSoftwareCopyrightEntity softwareCopyrightEntity : bizSoftwareCopyrightEntities) {
after(softwareCopyrightEntity);
});
}
}
}
......@@ -143,8 +143,9 @@ public class SoftwareCopyRightScheduler {
if (StringUtils.isBlank(softwareCopyrightEntity.getGeneratedDocType())) {
return;
}
docTypes = JsonUtils.deSerialize(softwareCopyrightEntity.getGeneratedDocType(), new TypeReference<List<String>>() {
}.getType());
docTypes = JsonUtils.deSerialize(softwareCopyrightEntity.getGeneratedDocType(),
new TypeReference<List<String>>() {
}.getType());
if (CollectionUtils.isEmpty(docTypes)) {
return;
}
......
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