This commit is contained in:
xyj 2024-01-25 10:10:11 +08:00
parent 8da308aade
commit bafd5eb5ac
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class DataQuery(BaseModel):
async def data_query(params: DataQuery):
try:
deviceId = params.deviceId
if deviceId == None or deviceId == "":
if deviceId is None or deviceId == "" or len(deviceId) != 4:
return BaseResponse(code=500, msg="参数错误")
sql = f"select last * from root.farm.{deviceId}"
send_json = {