rfid_last_data_query
This commit is contained in:
parent
872d820a8f
commit
6006658de4
3
xumu.py
3
xumu.py
|
@ -86,6 +86,7 @@ async def rest_query(request: Request):
|
|||
# RFID查询接口
|
||||
@app.get("/api/xumu/rfid/query")
|
||||
async def rfid_query(rfid):
|
||||
# TODO 可能一个rfid有多个iccid设备上传,需要获取所有的设备数据,然后返回,现在这个功能只有一个设备 不一定是最新的
|
||||
try:
|
||||
sql = f"select deviceId from root.rfid where rfid='{rfid}'"
|
||||
send_json = {
|
||||
|
@ -269,7 +270,7 @@ async def process_data(request: Request):
|
|||
amatch1 = re.match(pattern, clientid)
|
||||
# 如果两个都不满足,那就错误
|
||||
if not amatch1:
|
||||
return BaseResponse(code=200, msg="error")
|
||||
return BaseResponse(code=500, msg="clientid error")
|
||||
# 连接成功处理
|
||||
if event == "client.connected":
|
||||
return await client_change_status(clientid, True)
|
||||
|
|
Loading…
Reference in New Issue