Browse Source

追加日志

peng 9 months ago
parent
commit
e687b2c684
1 changed files with 6 additions and 5 deletions
  1. 6 5
      Controller/EquipmentInfo.py

+ 6 - 5
Controller/EquipmentInfo.py

@@ -12,6 +12,7 @@ from Object.TokenObject import TokenObject
 from Service.CommonService import CommonService
 from Service.EquipmentInfoService import EquipmentInfoService
 from Service.ModelService import ModelService
+from Ansjer.config import LOGGER
 
 
 class EquipmentInfo(View):
@@ -37,15 +38,15 @@ class EquipmentInfo(View):
         operation = request_dict.get('operation', None)
         if not userID:
             return response.json(309)
-        if operation == 'query':    # 查询推送消息
+        if operation == 'query':  # 查询推送消息
             return self.query_info(request_dict, userID, response)
         elif operation == 'add':
             return self.add_info(request_dict, userID, response)
-        elif operation == 'update':     # 已读推送消息
+        elif operation == 'update':  # 已读推送消息
             return self.update_info(request_dict, userID, response)
-        elif operation == 'update-answer-status':   # 已接听一键通话消息
+        elif operation == 'update-answer-status':  # 已接听一键通话消息
             return self.update_answer_status(request_dict, userID, response)
-        elif operation == 'delete':     # 删除推送消息
+        elif operation == 'delete':  # 删除推送消息
             return self.delete_info(request_dict, response)
         elif operation == 'findByTime':
             return self.findByTime_info(request_dict, userID, response)
@@ -120,7 +121,7 @@ class EquipmentInfo(View):
                     equipment_info_model = EquipmentInfoService.get_equipment_info_model_with_full_id(full_id)
                     equipment_info_model.objects.filter(id=ei_id).update(status=1)
                 except Exception as e:
-                    print(repr(e))
+                    LOGGER.info('equipment/info/update接口报错:{}'.format(repr(e)))
         return response.json(0)
 
     @staticmethod