|
@@ -1200,9 +1200,10 @@ class CloudStorageView(View):
|
|
lang = request_dict.get('lang', 'en')
|
|
lang = request_dict.get('lang', 'en')
|
|
|
|
|
|
redisObj = RedisObject()
|
|
redisObj = RedisObject()
|
|
- if redisObj.get_data(key=uid+'do_experience_order'):
|
|
|
|
- return response.json(5)
|
|
|
|
- redisObj.set_data(key=uid+'do_experience_order', val=uid, expire=300)
|
|
|
|
|
|
+ redisObj.CONN.setnx(uid+'do_experience_order', 1)
|
|
|
|
+ re.CONN.expire(uid+'do_experience_order', 60)
|
|
|
|
+ if not res:
|
|
|
|
+ return json(200000, 'Invalid request')
|
|
|
|
|
|
if cdk is not None and pay_type == 11:
|
|
if cdk is not None and pay_type == 11:
|
|
cdk_qs = CDKcontextModel.objects.filter(cdk=cdk).values('is_activate', 'rank__id', 'rank__commodity_code')
|
|
cdk_qs = CDKcontextModel.objects.filter(cdk=cdk).values('is_activate', 'rank__id', 'rank__commodity_code')
|
|
@@ -1214,6 +1215,7 @@ class CloudStorageView(View):
|
|
commodity_code = cdk_qs[0]['rank__commodity_code']
|
|
commodity_code = cdk_qs[0]['rank__commodity_code']
|
|
|
|
|
|
if uid is None or channel is None or commodity_code is None or pay_type is None or rank is None:
|
|
if uid is None or channel is None or commodity_code is None or pay_type is None or rank is None:
|
|
|
|
+ del_data(key=uid + 'do_experience_order')
|
|
return response.json(13, '参数有误.')
|
|
return response.json(13, '参数有误.')
|
|
|
|
|
|
dvq = Device_Info.objects.filter(UID=uid)
|
|
dvq = Device_Info.objects.filter(UID=uid)
|
|
@@ -1324,10 +1326,11 @@ class CloudStorageView(View):
|
|
sms = 'SMS_219748439'
|
|
sms = 'SMS_219748439'
|
|
|
|
|
|
self.do_vod_msg_Notice(uid, channel, userID, lang, sys_msg_text_list, sms)
|
|
self.do_vod_msg_Notice(uid, channel, userID, lang, sys_msg_text_list, sms)
|
|
- redisObj.del_data(key=uid+'do_experience_order')
|
|
|
|
result = returnurl
|
|
result = returnurl
|
|
|
|
+ redisObj.del_data(key=uid+'do_experience_order')
|
|
return response.json(0, result)
|
|
return response.json(0, result)
|
|
except Exception:
|
|
except Exception:
|
|
|
|
+ del_data(key=uid + 'do_experience_order')
|
|
return response.json(474)
|
|
return response.json(474)
|
|
# red_url =
|
|
# red_url =
|
|
# return JsonResponse(status=200, data={'red_url': red_url})
|
|
# return JsonResponse(status=200, data={'red_url': red_url})
|