优化sync_system代码质量

This commit is contained in:
strepsiades
2026-04-01 11:52:57 +08:00
parent eb02fd32a5
commit 8f4727a772
46 changed files with 1431 additions and 890 deletions
@@ -24,19 +24,16 @@ class SupplierSyncStrategy(DefaultSyncStrategy[SupplierDetailResponse]):
update_direction=UpdateDirection.PULL,
)
def _needs_update(
def should_update_pair(
self,
source_node,
target_node,
resolved_data=None,
*,
source_data,
target_data,
data_id_map=None,
) -> bool:
"""Supplier 更新忽略 id 字段差异。"""
if resolved_data is None:
raise ValueError(f"[{self.node_type}] resolved_data is required for differential sync.")
source_data = resolved_data
target_data = target_node.get_data()
if source_data is None or target_data is None:
return False