浏览代码

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

linhaohong 1 年之前
父节点
当前提交
def90a2f02
共有 1 个文件被更改,包括 4 次插入4 次删除
  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: