zhanghaijun лет назад: 2
Родитель
Сommit
b9b01826e4
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/main/java/com/cec/plugins/service/task/LogService.java

+ 2 - 2
src/main/java/com/cec/plugins/service/task/LogService.java

@@ -21,7 +21,7 @@ import org.springframework.stereotype.Component;
 @Slf4j
 @Component
 @RequiredArgsConstructor
-public class LogService implements ApplicationRunner {
+public class SystemLogService implements ApplicationRunner {
 
     private final RedisClientSource redisClientSource;
     private final ReportService reportService;
@@ -30,7 +30,7 @@ public class LogService implements ApplicationRunner {
     public void run(ApplicationArguments args) throws Exception {
         redisClientSource.subscribe("LOGINFO", String.class, messageStr -> {
             log.info("订阅redis, key: {}, message: {}", "LOGINFO", messageStr);
-            SystemLogDto.LogItem logItem = JSONUtil.toBean(messageStr, SystemLogDto.LogItem.class);
+            SystemLogDto.LogItem logItem = JSONUtil.toBean(messageStr.replaceAll("“","\"").replaceAll("”","\""), SystemLogDto.LogItem.class);
             SystemLogDto dto = new SystemLogDto();
             String taskId = redisClientSource.getCacheStr(TaskEnum.TaskId.getKey());
             if (StrUtil.isBlank(taskId)) {