|
@@ -142,7 +142,8 @@ class MealManage(View):
|
|
qs = qs.annotate(title=F('lang__title'), content=F('lang__content'))
|
|
qs = qs.annotate(title=F('lang__title'), content=F('lang__content'))
|
|
qs = qs.values("id", "title", "price", "day", "add_time", "update_time", "currency", "expire", "symbol"
|
|
qs = qs.values("id", "title", "price", "day", "add_time", "update_time", "currency", "expire", "symbol"
|
|
, "commodity_type", "commodity_code", "virtual_price", "is_discounts", "discount_price"
|
|
, "commodity_type", "commodity_code", "virtual_price", "is_discounts", "discount_price"
|
|
- , "bucket_id", "bucket__bucket", "bucket__area", "bucket__storeDay", "bucket__mold", "is_show")
|
|
|
|
|
|
+ , "bucket_id", "bucket__bucket", "bucket__area", "bucket__storeDay", "bucket__mold", "is_show",
|
|
|
|
+ "is_ai", "pixel_level")
|
|
res = {}
|
|
res = {}
|
|
items_list = []
|
|
items_list = []
|
|
if qs.exists():
|
|
if qs.exists():
|
|
@@ -178,6 +179,8 @@ class MealManage(View):
|
|
symbol = request_dict.get('symbol', None)
|
|
symbol = request_dict.get('symbol', None)
|
|
type = request_dict.get('type', None)
|
|
type = request_dict.get('type', None)
|
|
is_show = request_dict.get('is_show', None)
|
|
is_show = request_dict.get('is_show', None)
|
|
|
|
+ is_ai = request_dict.get('is_ai', None)
|
|
|
|
+ pixel_level = request_dict.get('pixel_level', None)
|
|
# if not id or not title or not price or not content or not day or not type:
|
|
# if not id or not title or not price or not content or not day or not type:
|
|
if not id or not price or not day or not type:
|
|
if not id or not price or not day or not type:
|
|
# return response.json(444, 'id, title, price, content, day,type')
|
|
# return response.json(444, 'id, title, price, content, day,type')
|
|
@@ -200,6 +203,8 @@ class MealManage(View):
|
|
store_meal.expire = expire
|
|
store_meal.expire = expire
|
|
store_meal.symbol = symbol
|
|
store_meal.symbol = symbol
|
|
store_meal.is_show = is_show
|
|
store_meal.is_show = is_show
|
|
|
|
+ store_meal.is_ai = is_ai
|
|
|
|
+ store_meal.pixel_level = pixel_level
|
|
store_meal.day = day
|
|
store_meal.day = day
|
|
if bucketID:
|
|
if bucketID:
|
|
store_meal.bucket_id = bucketID
|
|
store_meal.bucket_id = bucketID
|