|
@@ -95,6 +95,7 @@ class MealManage(View):
|
|
|
discount_price = request_dict.get('discount_price', None)
|
|
|
expire = request_dict.get('expire', None)
|
|
|
symbol = request_dict.get('symbol', None)
|
|
|
+ is_show = request_dict.get('is_show', None)
|
|
|
|
|
|
# if not title or not id or not price or not day or not content:
|
|
|
if not id or not price or not day:
|
|
@@ -108,7 +109,7 @@ class MealManage(View):
|
|
|
return response.json(10, '已存在')
|
|
|
store_meal = Store_Meal(id=id, price=price, day=day, bucket_id=bucketID, commodity_code=commodity_code,
|
|
|
currency=currency, virtual_price=virtual_price, is_discounts=is_discounts,
|
|
|
- discount_price=discount_price, expire=expire, symbol=symbol)
|
|
|
+ discount_price=discount_price, expire=expire, symbol=symbol, is_show=is_show)
|
|
|
store_meal.save()
|
|
|
paytype = paytype.split(',')
|
|
|
if len(paytype) > 0:
|
|
@@ -140,7 +141,7 @@ class MealManage(View):
|
|
|
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"
|
|
|
, "commodity_type", "commodity_code", "virtual_price", "is_discounts", "discount_price"
|
|
|
- , "bucket_id", "bucket__bucket", "bucket__area", "bucket__storeDay", "bucket__mold")
|
|
|
+ , "bucket_id", "bucket__bucket", "bucket__area", "bucket__storeDay", "bucket__mold", "is_show")
|
|
|
res = {}
|
|
|
items_list = []
|
|
|
if qs.exists():
|
|
@@ -175,6 +176,7 @@ class MealManage(View):
|
|
|
expire = request_dict.get('expire', None)
|
|
|
symbol = request_dict.get('symbol', None)
|
|
|
type = request_dict.get('type', None)
|
|
|
+ is_show = request_dict.get('is_show', None)
|
|
|
# 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:
|
|
|
# return response.json(444, 'id, title, price, content, day,type')
|
|
@@ -196,6 +198,7 @@ class MealManage(View):
|
|
|
store_meal.discount_price = discount_price
|
|
|
store_meal.expire = expire
|
|
|
store_meal.symbol = symbol
|
|
|
+ store_meal.is_show = is_show
|
|
|
store_meal.day = day
|
|
|
if bucketID:
|
|
|
store_meal.bucket_id = bucketID
|