update
This commit is contained in:
parent
790638f4d8
commit
6aeb45df99
12
xumu.py
12
xumu.py
|
@ -25,6 +25,18 @@ class BaseResponse(BaseModel):
|
||||||
async def video_query(username):
|
async def video_query(username):
|
||||||
return BaseResponse(data=get_video_url(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")
|
@app.get("/api/xumu/device/online")
|
||||||
async def device_online_query(iccid, deviceId):
|
async def device_online_query(iccid, deviceId):
|
||||||
|
|
Loading…
Reference in New Issue