|
@@ -113,16 +113,16 @@ class NotificationView(View):
|
|
values('token_val', 'app_type', 'appBundleId', 'push_type', 'uid')
|
|
values('token_val', 'app_type', 'appBundleId', 'push_type', 'uid')
|
|
if uaqs.exists():
|
|
if uaqs.exists():
|
|
for ua in uaqs:
|
|
for ua in uaqs:
|
|
- push_type = uaqs[0]['push_type']
|
|
|
|
|
|
+ push_type = ua['push_type']
|
|
# ios apns
|
|
# ios apns
|
|
if push_type == 0:
|
|
if push_type == 0:
|
|
- return self.do_apns(request_dict, uaqs[0], response)
|
|
|
|
|
|
+ return self.do_apns(request_dict, ua, response)
|
|
# android gcm
|
|
# android gcm
|
|
elif push_type == 1:
|
|
elif push_type == 1:
|
|
- return self.do_gmc(request_dict, uaqs[0], response)
|
|
|
|
|
|
+ return self.do_gmc(request_dict, ua, response)
|
|
# android jpush
|
|
# android jpush
|
|
elif push_type == 2:
|
|
elif push_type == 2:
|
|
- return self.do_jpush(request_dict, uaqs[0], response)
|
|
|
|
|
|
+ return self.do_jpush(request_dict, ua, response)
|
|
return response.json(0)
|
|
return response.json(0)
|
|
|
|
|
|
else:
|
|
else:
|
|
@@ -245,7 +245,7 @@ class NotificationView(View):
|
|
|
|
|
|
def do_save_equipment_info(self,userID_id):
|
|
def do_save_equipment_info(self,userID_id):
|
|
Equipment_Info.objects.create(
|
|
Equipment_Info.objects.create(
|
|
- userID_id='',
|
|
|
|
|
|
+ userID_id=userID_id,
|
|
eventTime='',
|
|
eventTime='',
|
|
eventType='',
|
|
eventType='',
|
|
devUid='',
|
|
devUid='',
|