feat: 支持 Linux 客户端配置与发布校验

This commit is contained in:
2026-07-14 08:43:58 +00:00
parent 6df8e3ad31
commit 1b4293e57c
10 changed files with 173 additions and 36 deletions
+11
View File
@@ -51,6 +51,17 @@ def list_licenses(app_id: str = "", include_deleted: bool = False) -> list:
return rows
def get_license_by_hash_with_usage(license_key_hash: str):
conn = db.get_conn()
row = conn.execute(
"""SELECT l.*,(SELECT COUNT(*) FROM license_devices d WHERE d.license_id=l.license_id) used_devices
FROM licenses l WHERE l.license_key_hash=? AND l.status<>'deleted'""",
(license_key_hash,),
).fetchone()
conn.close()
return row
def set_license_status(license_id: str, status: str) -> int:
conn = db.get_conn()
cur = conn.execute(