|
@@ -89,9 +89,10 @@ class GatewayFamilyRoomView(View):
|
|
@param response: 响应参数
|
|
@param response: 响应参数
|
|
@return:
|
|
@return:
|
|
"""
|
|
"""
|
|
- ids = request_dict.getlist('roomIds', None)
|
|
|
|
|
|
+ ids = request_dict.get('roomIds', None)
|
|
if not ids:
|
|
if not ids:
|
|
return response.json(444)
|
|
return response.json(444)
|
|
|
|
+ ids = ids.split(',')
|
|
room_id = ids[0]
|
|
room_id = ids[0]
|
|
room_info = FamilyRoom.objects.filter(id=room_id)
|
|
room_info = FamilyRoom.objects.filter(id=room_id)
|
|
if not room_info.exists():
|
|
if not room_info.exists():
|
|
@@ -120,13 +121,14 @@ class GatewayFamilyRoomView(View):
|
|
@param response: 响应参数
|
|
@param response: 响应参数
|
|
@return:
|
|
@return:
|
|
"""
|
|
"""
|
|
- ids = request_dict.getlist('ids', None)
|
|
|
|
|
|
+ ids = request_dict.get('ids', None)
|
|
if not ids:
|
|
if not ids:
|
|
return response.json(444)
|
|
return response.json(444)
|
|
- for item in ids:
|
|
|
|
- items = item.split(',')
|
|
|
|
- room_id = items[0]
|
|
|
|
- sort = items[1]
|
|
|
|
|
|
+ items = ids.split(',')
|
|
|
|
+ for item in items:
|
|
|
|
+ vals = item.split('-')
|
|
|
|
+ room_id = vals[0]
|
|
|
|
+ sort = vals[1]
|
|
family_room = FamilyRoom.objects.filter(id=int(room_id))
|
|
family_room = FamilyRoom.objects.filter(id=int(room_id))
|
|
if family_room.exists():
|
|
if family_room.exists():
|
|
family_room.update(sort=int(sort))
|
|
family_room.update(sort=int(sort))
|