This commit is contained in:
xyj 2024-01-26 16:57:34 +08:00
parent b63c68e1f8
commit 553eb7a2c5
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ async def data_query(username):
@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):
try: try:
sql = "select is_online from root.farm.clientId where time >= 0" sql = "select * from root.farm.clientId where time >= 0"
# 检查iccid是否有值如果有添加到SQL语句中 # 检查iccid是否有值如果有添加到SQL语句中
if iccid: if iccid:
sql += f" and iccid = '{iccid}'" sql += f" and iccid = '{iccid}'"