|
@@ -27,7 +27,7 @@ from Controller.CloudPhoto.CloudServiceController import CloudServiceController
|
|
|
from Controller.PaymentCycle import Paypal
|
|
|
from Model.models import Device_Info, Order_Model, Store_Meal, VodHlsModel, UID_Bucket, StsCrdModel, \
|
|
|
ExperienceContextModel, Pay_Type, CDKcontextModel, Device_User, SysMsgModel, Unused_Uid_Meal, PromotionRuleModel, \
|
|
|
- VideoPlaybackTimeModel, CouponModel, VodBucketModel, VodHlsSummary, VodHlsTagType
|
|
|
+ VideoPlaybackTimeModel, CouponModel, VodBucketModel, VodHlsSummary, VodHlsTagType, UidSetModel
|
|
|
from Object.AWS.AmazonS3Util import AmazonS3Util
|
|
|
from Object.AWS.S3Email import S3Email
|
|
|
from Object.AliPayObject import AliPayObject
|
|
@@ -187,7 +187,14 @@ class CloudStorageView(View):
|
|
|
device_info_qs = Device_Info.objects.filter(Q(UID=uid), Q(Type__lte=4) | Q(Type=10001))
|
|
|
if device_info_qs.exists():
|
|
|
return response.json(0)
|
|
|
-
|
|
|
+ # 查询设备像素
|
|
|
+ uid_set_qs = UidSetModel.objects.filter(uid=uid).values('ucode')
|
|
|
+ if not uid_set_qs.exists():
|
|
|
+ return response.json(173)
|
|
|
+ ucode = uid_set_qs[0]['ucode']
|
|
|
+ pixel_level = 0
|
|
|
+ if ucode and int(ucode[-5]) >= 8:
|
|
|
+ pixel_level = 1
|
|
|
store_qs = Store_Meal.objects.filter(Q(lang__lang=lang), Q(is_show=0), ~Q(pay_type='11')) # 过滤激活码、隐藏套餐
|
|
|
experience_context_qs = ExperienceContextModel.objects.filter(uid=uid, experience_type=0)
|
|
|
|
|
@@ -196,9 +203,9 @@ class CloudStorageView(View):
|
|
|
|
|
|
# 没体验过的设备只返回体验套餐,体验过的不返回体验套餐
|
|
|
if experience_context_qs.exists():
|
|
|
- store_qs = store_qs.filter(~Q(pay_type='10'))
|
|
|
+ store_qs = store_qs.filter(~Q(pay_type='10'), Q(pixel_level=pixel_level)) # 筛选像素等级
|
|
|
else:
|
|
|
- store_qs = store_qs.filter(pay_type='10')
|
|
|
+ store_qs = store_qs.filter(pay_type='10') # 体验套餐不区分像素等级
|
|
|
|
|
|
store_qs = store_qs.annotate(title=F('lang__title'), content=F('lang__content'),
|
|
|
discount_content=F('lang__discount_content'))
|