Browse Source

查询设备订单明细添加默认值

linhaohong 1 year ago
parent
commit
def90a2f02
1 changed files with 4 additions and 4 deletions
  1. 4 4
      AdminController/CloudServiceManage/AgentDeviceController.py

+ 4 - 4
AdminController/CloudServiceManage/AgentDeviceController.py

@@ -189,10 +189,10 @@ class AgentDeviceView(View):
         @return:
         """
         try:
-            startTime = int(request_dict.get('startTime'))
-            endTime = int(request_dict.get('endTime'))
-            timeUnit = request_dict.get('timeUnit')
-            metric_type = int(request_dict.get('metric_type'))
+            startTime = int(request_dict.get('startTime', 1704038400))
+            endTime = int(request_dict.get('endTime', 1732982400))
+            timeUnit = request_dict.get('timeUnit', 'month')
+            metric_type = int(request_dict.get('metric_type', 0))
 
             agent_customer_info = AgentCustomerInfo.objects.filter(user_id=userID).first()
             if not agent_customer_info: