feat(处理器): 增强变量处理链并实现批量更新
- 新增 UpdateDbVariableProcessor 处理器,通过队列和定时器实现数据库的批量更新,以降低负载。 - 重构 ValueConvertProcessor 处理器,使其能够解析 ConversionFormula 公式,计算出最终的 DisplayValue。 - 扩展 IVariableRepository 仓储接口,添加 UpdateBatchAsync 方法,并使用SqlSugar实现高效的批量更新。 - 优化 VariableContext 模型,将 NewValue 类型统一为 string,简化了数据流并提升了类型安全。
This commit is contained in:
@@ -7,10 +7,10 @@ namespace DMS.Application.Models
|
||||
{
|
||||
public VariableDto Data { get; set; }
|
||||
|
||||
public object NewValue { get; set; }
|
||||
public string NewValue { get; set; }
|
||||
public bool IsHandled { get; set; }
|
||||
|
||||
public VariableContext(VariableDto data, object newValue=null)
|
||||
public VariableContext(VariableDto data, string newValue="")
|
||||
{
|
||||
Data = data;
|
||||
IsHandled = false; // 默认未处理
|
||||
|
||||
Reference in New Issue
Block a user