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") # 创建相应的数据库和字段