This commit is contained in:
HuangHai
2026-01-21 08:41:47 +08:00
parent 306a3a4127
commit e51dc18d06
40 changed files with 1309 additions and 965 deletions

View File

@@ -489,6 +489,10 @@ class SqlTemplateLoader:
template_map_str = await redisKit.get_data(REDIS_SQL_TEMPLATE_MAP_KEY)
if template_map_str:
self._template_map = json.loads(template_map_str)
# 无论从Redis加载了什么,都尝试重新构建一次映射以确保一致性
if self.templates and not self._template_map:
self._build_template_map()
except Exception as e:
logger.error(f"从Redis加载SQL模板数据失败: {str(e)}")