Переглянути джерело

Merge remote-tracking branch 'remotes/origin/dev' into test

tanghongbin 4 роки тому
батько
коміт
7b9e2bcf04
3 змінених файлів з 6 додано та 4 видалено
  1. 1 1
      Controller/EquipmentManagerV3.py
  2. 2 1
      Model/models.py
  3. 3 2
      Service/ModelService.py

+ 1 - 1
Controller/EquipmentManagerV3.py

@@ -99,7 +99,7 @@ class EquipmentManagerV3(View):
                                                  NickName=NickName, View_Account=View_Account,
                                                  View_Password=View_Password, Type=Type, ChannelIndex=ChannelIndex)
                         userDevice.save()
-                        asy = threading.Thread(target=ModelService.del_eq_info, args=(UID, userID, NickName))
+                        asy = threading.Thread(target=ModelService.notify_alexa_add, args=(UID, userID, NickName))
                         asy.start()
                         # redisObj = RedisObject(db=8)
                         # redisObj.del_data(key='uid_qs_' + userID)

+ 2 - 1
Model/models.py

@@ -357,7 +357,7 @@ class User_Brand(models.Model):
     # 关联用户
     userID = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE)
     deviceSupplier = models.CharField(max_length=32, default='', verbose_name='(必填)设备供应商 string  (例:华为、小米...)')
-    deviceModel = models.CharField(max_length=32, default='', verbose_name='(必填)设备型号 string @mock=HM NOTE 1TD')
+    deviceModel = models.CharField(max_length=64, default='', verbose_name='(必填)设备型号 string @mock=HM NOTE 1TD')
     osType = models.CharField(max_length=32, default='', verbose_name='(必填)操作系统名称 string @mock=Android')
     osVersion = models.CharField(max_length=32, default='', verbose_name='(必填)操作系统版本号 string @mock=4.0')
 
@@ -513,6 +513,7 @@ class App_Colophon(models.Model):
 
 class Order_Model(models.Model):
     orderID = models.CharField(blank=True, max_length=20, primary_key=True, verbose_name=u'订单id')
+    trade_no = models.CharField(blank=True, max_length=32, default='', verbose_name='第三方订单号')
     # 订单关联用户
     userID = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE)
     UID = models.CharField(max_length=20, verbose_name='设备UID')

+ 3 - 2
Service/ModelService.py

@@ -140,7 +140,7 @@ class ModelService:
 
     @staticmethod
     def del_eq_info(userID, uid):
-        notify_alexa_delete(uid)
+        notify_alexa_delete(userID, uid)
         ei_qs = Equipment_Info.objects.filter(userID_id=userID, devUid=uid)
         ei_qs.delete()
         # ei_count = ei_qs.count()
@@ -169,9 +169,10 @@ class ModelService:
             print(repr(e))
 
 
-def notify_alexa_delete(UID):
+def notify_alexa_delete(userID, UID):
     url = 'https://www.zositech.xyz/deviceStatus/delete'
     data = {
+        'userID': userID,
         'UID': UID
     }
     try: