Browse Source

修改addOrUpdate12

tanghongbin 4 years ago
parent
commit
0ea4dd34e1
1 changed files with 13 additions and 0 deletions
  1. 13 0
      Controller/EquipmentManagerV3.py

+ 13 - 0
Controller/EquipmentManagerV3.py

@@ -196,6 +196,19 @@ class EquipmentManagerV3(View):
                 di_qs = Device_Info.objects.filter(UID=uid)
                 di_qs.update(NickName=nickname)
                 if deviceData is not None and deviceData.__contains__('NickName') and us_qs[0].is_alexa:
+                    file_path = '/'.join((BASE_DIR, 'static/test.log'))
+                    file = open(file_path, 'a+')
+
+                    file.write(uid)
+                    file.write('------unEnter--')
+                    file.write('\n')
+                    file.write(userID)
+                    file.write('\n')
+                    file.write(nickname)
+                    file.write('\n')
+                    file.flush()
+                    file.close()
+
                     asy = threading.Thread(target=ModelService.notify_alexa_add, args=(uid, userID, nickname))
                     asy.start()
             # redisObj = RedisObject(db=8)