tanghongbin пре 5 година
родитељ
комит
b77ca999c2
2 измењених фајлова са 10 додато и 10 уклоњено
  1. 2 2
      AnsjerUIDManage/settings.py
  2. 8 8
      Controller/FileController.py

+ 2 - 2
AnsjerUIDManage/settings.py

@@ -114,8 +114,8 @@ DATABASES = {
     'default': {
         'ENGINE': 'django.db.backends.mysql',
         'NAME': 'ansjer_uid',
-        'USER': 'root',
-        'PASSWORD': '123456',
+        'USER': 'ansjer',
+        'PASSWORD': 'ansjer.x.x',
         'HOST': 'localhost',
         'PORT': '3306',
         'OPTIONS': {'charset': 'utf8mb4', 'use_unicode': True, 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"},

+ 8 - 8
Controller/FileController.py

@@ -118,16 +118,16 @@ class UploadUIDFileView(View):
                         }
                         MacModel.objects.filter().update(**data)
                 except Exception as e:
-                    # print('--------------------------error 5000')
-                    # print(repr(e))
+                    print('--------------------------error 5000')
+                    print(repr(e))
                     if savePoint:
                         transaction.rollback(savePoint)
                     return response.json(174, str(e))
                 else:
                     savePoint = None
             except Exception as e:
-                # print('--------------------------error 5001')
-                # print(repr(e))
+                print('--------------------------error 5001')
+                print(repr(e))
                 return response.json(174, str(e))
             count += 1
             tmpMac = CommonService.updateMac(mac['value'])
@@ -145,8 +145,8 @@ class UploadUIDFileView(View):
                     UIDModel.objects.bulk_create(bulk)
                     bulk.clear()
             except Exception as e:
-                # print('--------------------------error')
-                # print(repr(e))
+                print('--------------------------error')
+                print(repr(e))
                 if savePoint:
                     transaction.rollback(savePoint)
                 return response.json(174)
@@ -159,8 +159,8 @@ class UploadUIDFileView(View):
                 }
                 MacModel.objects.filter().update(**data)
         except Exception as e:
-            # print('--------------------------error 1111')
-            # print(repr(e))
+            print('--------------------------error 1111')
+            print(repr(e))
             return response.json(174)
 
         # print('重复:')