From fd0618b83f3ee00854ebcd703becc00d5f19e4a9 Mon Sep 17 00:00:00 2001 From: xyj <1090822794@qq.com> Date: Mon, 4 Mar 2024 15:52:54 +0800 Subject: [PATCH] fixed --- xumu.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xumu.py b/xumu.py index 6d2c697..affea35 100644 --- a/xumu.py +++ b/xumu.py @@ -161,10 +161,10 @@ async def register(request: Request): send_json = create_register_sql(iccid, deviceId, type) r = requests.post(baseHost + nonQueryUri, headers=headers, json=send_json) res.append(r.json()) - # 插入设备状态表,只有新注册的才会插入设备表 - send_json = insert_device_status_sql(iccid, clientid, deviceId) - r = requests.post(baseHost + nonQueryUri, headers=headers, json=send_json) - res.append(r.json()) + # TODO 插入设备状态表,如果状态表有,那么不插入设备表,如果状态表没有,则插入 + send_json = insert_device_status_sql(iccid, clientid, deviceId) + r = requests.post(baseHost + nonQueryUri, headers=headers, json=send_json) + res.append(r.json()) else: return BaseResponse(code=500, msg="500 Internal error") # 创建相应的数据库和字段