refactor(coal): 修改事件广播类型

- 将 update 事件改为 updateKfItems 和 updateMain
- 根据上下文推测,updateKfItems 可能用于更新铿奋项,updateMain 用于更新主数据
This commit is contained in:
2025-03-12 21:07:38 +08:00
parent 5cd2bd8282
commit 8bd5423bbd

View File

@@ -154,7 +154,7 @@ public class CoalWashingDailyAnalysisService
entity.setName(productService.get(entity.getProduct().getId()).getName());
}
this.repository.save(entity);
sseService.broadcast("coalWashingDailyAnalysis." + entity.getId(), ImmutableMap.of("id", entity.getId(), "event", "update"));
sseService.broadcast("coalWashingDailyAnalysis." + entity.getId(), ImmutableMap.of("id", entity.getId(), "event", "updateKfItems"));
return getById(entity.getId());
}
@@ -183,7 +183,7 @@ public class CoalWashingDailyAnalysisService
entity.setName(productService.get(entity.getProduct().getId()).getName());
}
this.repository.save(entity);
sseService.broadcast("coalWashingDailyAnalysis." + entity.getId(), ImmutableMap.of("id", entity.getId(), "event", "update"));
sseService.broadcast("coalWashingDailyAnalysis." + entity.getId(), ImmutableMap.of("id", entity.getId(), "event", "updateMain"));
return getById(entity.getId());
}