Merge remote-tracking branch 'origin/fix_get_domin' into fix_get_domin_bak

This commit is contained in:
yujj128
2025-06-24 19:33:54 +08:00

View File

@@ -103,14 +103,16 @@ def query_room_info(data: dict, params: dict) -> str:
if data.get('Region') and data.get('Region') != 'None':
region = data.get('Region')
for b in result:
if (region in b.get('name', 'default') or region in b.get('typeName', 'default')) and b.get('capacity',0) >= data.get('capacity', 0):
if (region in b.get('name', 'default') or region in b.get('typeName', 'default')) and b.get('capacity',
0) >= data.get(
'capacity', 0):
new_list.append(b)
if len(new_list) >= DEFAULT_QUERY_SIZE:
logger.debug("regin--------------- {0}".format(new_list))
return json.dumps(new_list, ensure_ascii=False)
else:
for b in result:
if b.get('capacity',0) >= data.get('capacity', 0):
if b.get('capacity', 0) >= data.get('capacity', 0):
new_list.append(b)
if len(new_list) >= DEFAULT_QUERY_SIZE:
return json.dumps(new_list, ensure_ascii=False)