Ver código fonte

优化旧接口APP消息推送

zhangdongming 2 anos atrás
pai
commit
9e7db97aa0
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      Controller/DetectController.py

+ 4 - 1
Controller/DetectController.py

@@ -93,7 +93,7 @@ class NotificationView(View):
                 values('token_val', 'app_type', 'appBundleId', 'm_code',
                        'push_type', 'userID_id', 'userID__NickName',
                        'lang', 'm_code', 'tz', 'uid_set__nickname', 'uid_set__detect_interval', 'uid_set__detect_group',
-                       'uid_set__channel')
+                       'uid_set__channel', 'uid_set__new_detect_interval')
 
             uid_push_list = []
             for qs in uid_push_qs:
@@ -121,6 +121,9 @@ class NotificationView(View):
             else:
                 detect_med_type = 2  # 为2的话,既推送,又存库
                 # detect_group=0允许全部推送的时候
+                new_detect_interval = uid_push_list[0]['uid_set__new_detect_interval']
+                detect_interval = new_detect_interval if new_detect_interval > 0 else detect_interval
+                detect_interval = 60 if detect_interval < 60 else detect_interval
                 if detect_group == '0' or detect_group == '':
                     redisObj.set_data(key=dkey, val=1, expire=detect_interval)
                 else: