|
@@ -262,6 +262,7 @@ class UpdateDataTool:
|
|
|
# 先查询是否存在相同 request_id + content_id 的记录
|
|
|
check_sql = "SELECT id, status FROM knowledge_parsing_content WHERE request_id = %s AND content_id = %s LIMIT 1"
|
|
|
exists = MysqlHelper.get_values(check_sql, (request_id, content_id))
|
|
|
+ logger.info(f"查询结果: exists={exists}, request_id={request_id}, content_id={content_id}")
|
|
|
|
|
|
# 状态:2 表示识别处理完成
|
|
|
status = 2
|
|
@@ -270,6 +271,7 @@ class UpdateDataTool:
|
|
|
if exists:
|
|
|
# 已存在则更新,不新建
|
|
|
existing_id = exists[0][0] if isinstance(exists, list) and len(exists) > 0 else None
|
|
|
+ logger.info(f"提取existing_id: {existing_id}, 原始数据: {exists[0] if exists else 'None'}")
|
|
|
update_sql = (
|
|
|
"UPDATE knowledge_parsing_content "
|
|
|
"SET indentify_data = %s, task_id = %s, status = %s, update_time = NOW() "
|