This commit is contained in:
xyj 2024-02-05 10:10:43 +08:00
parent 790638f4d8
commit 6aeb45df99
1 changed files with 12 additions and 0 deletions

12
xumu.py
View File

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