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):