|
@@ -13,6 +13,7 @@
|
|
|
"""
|
|
|
import traceback
|
|
|
|
|
|
+from django.db.models import F
|
|
|
from django.utils import timezone
|
|
|
from django.utils.decorators import method_decorator
|
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
@@ -132,10 +133,15 @@ class MealManage(View):
|
|
|
|
|
|
page = int(request_dict.get('page', None))
|
|
|
line = int(request_dict.get('line', None))
|
|
|
+ lang = int(request_dict.get('lang', None))
|
|
|
if page is None or line is None:
|
|
|
return response.json(444)
|
|
|
+ if not lang:
|
|
|
+ lang = 'cn'
|
|
|
|
|
|
- qs = Store_Meal.objects.values("id", "price", "day", "add_time", "update_time", "currency"
|
|
|
+ qs = Store_Meal.objects.filter(lang__lang=lang)
|
|
|
+ qs = qs.annotate(title=F('lang__title'),content=F('lang__content'))
|
|
|
+ qs = qs.values("id", "price", "day", "add_time", "update_time", "currency"
|
|
|
, "bucket_id", "commodity_type", "commodity_code", "virtual_price", "is_discounts"
|
|
|
, "discount_price", "expire", "symbol"
|
|
|
, "bucket__bucket", "bucket__area", "bucket__storeDay")
|