[patch] 优化版本管理显示 与 更新提示(修改表名信息)

This commit is contained in:
2025-10-10 10:53:16 +08:00
parent 982e896916
commit bb5ef9ccbf
2 changed files with 25 additions and 6 deletions

View File

@@ -167,7 +167,7 @@ class DatabaseVersionManager:
try:
cursor = self.conn.cursor()
cursor.execute("""
SELECT version FROM web_version_history
SELECT version FROM web_versionhistory
WHERE type = '水滴智能通讯插件' AND is_delete = FALSE
ORDER BY release_time DESC LIMIT 1
""")
@@ -211,7 +211,7 @@ class DatabaseVersionManager:
try:
cursor = self.conn.cursor()
cursor.execute("""
SELECT version FROM web_version_history
SELECT version FROM web_versionhistory
WHERE content LIKE %s AND type = '水滴智能通讯插件'
ORDER BY release_time DESC LIMIT 1
""", (f'%{commit_id}%',))
@@ -241,7 +241,7 @@ class DatabaseVersionManager:
cursor = self.conn.cursor()
cursor.execute("""
INSERT INTO web_version_history
INSERT INTO web_versionhistory
(id, version, type, content, download_url, release_time, is_delete)
VALUES (%s, %s, %s, %s, %s, %s, %s)
""", (
@@ -258,6 +258,9 @@ class DatabaseVersionManager:
cursor.close()
logger.info(f"✅ 版本记录已保存到数据库 (ID: {record_id})")
logger.info(f" 📦 版本: {version_record['version']}")
logger.info(f" 🔗 下载地址: {version_record.get('download_url', '')}")
logger.info(f" 📝 内容: {version_record['content'][:50]}...")
return True
except Exception as e: