Explorar o código

操作日志,v1添加设备接口version字段

lhq %!s(int64=4) %!d(string=hai) anos
pai
achega
5b5e5095f5
Modificáronse 3 ficheiros con 5 adicións e 5 borrados
  1. 3 3
      Controller/Cloudsum.py
  2. 1 1
      Controller/EquipmentManager.py
  3. 1 1
      Service/OperatingLogs.py

+ 3 - 3
Controller/Cloudsum.py

@@ -138,9 +138,9 @@ class Cloudsum(View):
         if not page or not line:
         if not page or not line:
             return response.json(444, 'page,line')
             return response.json(444, 'page,line')
 
 
-        # own_perm = ModelService.check_perm(userID=userID, permID=30)
-        # if own_perm is not True:
-        #     return response.json(404)
+        own_perm = ModelService.check_perm(userID=userID, permID=30)
+        if own_perm is not True:
+            return response.json(404)
 
 
         if SERVER_TYPE == 'Ansjer.formal_settings':
         if SERVER_TYPE == 'Ansjer.formal_settings':
             logKey = 'logger'
             logKey = 'logger'

+ 1 - 1
Controller/EquipmentManager.py

@@ -363,7 +363,7 @@ def addInterface(request):
     View_Password = request_dict.get('View_Password', '')
     View_Password = request_dict.get('View_Password', '')
     Type = request_dict.get('Type', None)
     Type = request_dict.get('Type', None)
     ChannelIndex = request_dict.get('ChannelIndex', None)
     ChannelIndex = request_dict.get('ChannelIndex', None)
-    version = request_dict.get('version', None)
+    version = request_dict.get('version', '')
     isCheckMainUser = request_dict.get('isCheckMainUser', None)
     isCheckMainUser = request_dict.get('isCheckMainUser', None)
     isMainUserExists = False
     isMainUserExists = False
     if all([UID, NickName, View_Account, Type, ChannelIndex]):
     if all([UID, NickName, View_Account, Type, ChannelIndex]):

+ 1 - 1
Service/OperatingLogs.py

@@ -71,7 +71,7 @@ def addLog(request, status_code):
                     print('空')
                     print('空')
                     user = '空'
                     user = '空'
                 # 数据拼接
                 # 数据拼接
-                caozuo = user + '在' + str(nowtime) + '进行' + str(jiekou[request_path])
+                caozuo = '用户账号为:[' + user + ']' + '在' + str(nowtime) + '进行' + str(jiekou[request_path])
                 # + ',' + '设备uid或主键id为:' + str(d['uid']) + str(d['equipmentid'])
                 # + ',' + '设备uid或主键id为:' + str(d['uid']) + str(d['equipmentid'])
                 print('request_dict:', d)
                 print('request_dict:', d)
                 add_data = {
                 add_data = {