From 6aeb45df99fb2e96b35cea8ad5bf3dc77aed61e0 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Mon, 5 Feb 2024 10:10:43 +0800 Subject: [PATCH] update --- xumu.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xumu.py b/xumu.py index dec6931..658b380 100644 --- a/xumu.py +++ b/xumu.py @@ -25,6 +25,18 @@ class BaseResponse(BaseModel): async def video_query(username): return BaseResponse(data=get_video_url(username)) +@app.get("/api/xumu/warning") +async def get_warning(deviceId): + try: + sql = f"select * from root.farm.{deviceId}" + # 检查iccid是否有值,如果有,添加到SQL语句中 + send_json = { + "sql": sql + } + r = requests.post(baseHost + queryUri, headers=headers, json=send_json) + return BaseResponse(data=r.json()) + except Exception as e: + return BaseResponse(code=500, msg=str(e)) @app.get("/api/xumu/device/online") async def device_online_query(iccid, deviceId):