显式地将更新同步

This commit is contained in:
lhx
2025-12-29 08:50:13 +08:00
parent f2e4f5362e
commit a6f809e479

View File

@@ -497,6 +497,9 @@ class SettlementDataService(BaseService[SettlementData]):
'error': f'更新失败: {str(e)}'
})
logger.error(f"Failed to update record: {str(e)}")
# 刷新更新到数据库
db.flush()
logger.info(f"Updated {updated_count} records successfully")
# ===== 执行批量插入 =====
if to_insert: