|
@@ -44,7 +44,7 @@ from Object.UidTokenObject import UidTokenObject
|
|
from Service.CommonService import CommonService
|
|
from Service.CommonService import CommonService
|
|
from Object.m3u8generate import PlaylistGenerator
|
|
from Object.m3u8generate import PlaylistGenerator
|
|
from Object.WechatPayObject import WechatPayObject
|
|
from Object.WechatPayObject import WechatPayObject
|
|
-from django.db.models import Q
|
|
|
|
|
|
+from django.db.models import Q, F
|
|
|
|
|
|
from Service.ModelService import ModelService
|
|
from Service.ModelService import ModelService
|
|
|
|
|
|
@@ -208,9 +208,9 @@ class CloudStorageView(View):
|
|
# userqs = Device_User.objects.filter(userID=userID).values('is_experience')
|
|
# userqs = Device_User.objects.filter(userID=userID).values('is_experience')
|
|
|
|
|
|
if mold:
|
|
if mold:
|
|
- qs = qs.filter(bucket__mold=mold,lang=lang)
|
|
|
|
|
|
+ qs = qs.filter(bucket__mold=mold,lang__lang=lang)
|
|
else:
|
|
else:
|
|
- qs = qs.filter(lang=lang)
|
|
|
|
|
|
+ qs = qs.filter(lang__lang=lang)
|
|
|
|
|
|
if eq:
|
|
if eq:
|
|
qs = qs.filter(~Q(pay_type='10'))
|
|
qs = qs.filter(~Q(pay_type='10'))
|
|
@@ -218,6 +218,7 @@ class CloudStorageView(View):
|
|
qs = qs.filter(pay_type='10')
|
|
qs = qs.filter(pay_type='10')
|
|
|
|
|
|
qs = qs.filter(~Q(pay_type='11')) # 过滤不显示激活码套餐
|
|
qs = qs.filter(~Q(pay_type='11')) # 过滤不显示激活码套餐
|
|
|
|
+ qs = qs.annotate(title=F('lang__title'),content=F('lang__content'))
|
|
qs = qs.values("id", "title", "content", "price", "day", "currency", "bucket__storeDay",
|
|
qs = qs.values("id", "title", "content", "price", "day", "currency", "bucket__storeDay",
|
|
"bucket__bucket", "bucket__area", "commodity_code",
|
|
"bucket__bucket", "bucket__area", "commodity_code",
|
|
"commodity_type", "is_discounts", "virtual_price", "expire",
|
|
"commodity_type", "is_discounts", "virtual_price", "expire",
|