Pārlūkot izejas kodu

设备版本新增4G+云存配置

zhangdongming 2 nedēļas atpakaļ
vecāks
revīzija
de1b59a044

+ 4 - 0
AdminController/DeviceManagementController.py

@@ -1570,6 +1570,7 @@ class DeviceManagement(View):
         other_features = request_dict.get('otherFeatures', None)
         electricity_statistics = request_dict.get('electricityStatistics', 0)
         supports_pet_tracking = request_dict.get('supportsPetTracking', 0)
+        has_4g_cloud = request_dict.get('has4gCloud', -1)
         if not all([d_code, software_ver, video_code,
                     device_type, supports_alarm,
                     screen_channels, network_type]
@@ -1610,6 +1611,7 @@ class DeviceManagement(View):
                 other_features=other_features,
                 electricity_statistics=electricity_statistics,
                 supports_pet_tracking=supports_pet_tracking,
+                has_4g_cloud=has_4g_cloud,
                 created_time=now_time,
                 updated_time=now_time
             )
@@ -1643,6 +1645,7 @@ class DeviceManagement(View):
         other_features = request_dict.get('otherFeatures', None)
         electricity_statistics = request_dict.get('electricityStatistics', 0)
         supports_pet_tracking = request_dict.get('supportsPetTracking', 0)
+        has_4g_cloud = request_dict.get('has4gCloud', -1)
 
         if not all([device_ver_id, video_code, device_type, supports_alarm, screen_channels, network_type]):
             return response.json(444)
@@ -1691,6 +1694,7 @@ class DeviceManagement(View):
                 other_features=other_features,
                 electricity_statistics=electricity_statistics,
                 supports_pet_tracking=supports_pet_tracking,
+                has_4g_cloud=has_4g_cloud,
                 created_time=now_time,
                 updated_time=now_time
             )

+ 2 - 1
Controller/UserDevice/DeviceVersionInfoController.py

@@ -64,7 +64,8 @@ class DeviceVersionInfoView(View):
         elif operation == 'getDeviceVersion':
             d_code = request_dict.get('d_code')
             ver = request_dict.get('ver')
-            return self.cache_device_version_info(d_code, ver)
+            res = self.cache_device_version_info(d_code, ver)
+            return response.json(0, res)
         else:
             return response.json(414)
     @classmethod