|
@@ -103,16 +103,14 @@ class CloudStorageView(View):
|
|
|
|
|
|
def do_commodity_list(self, request_dict, userID, response):
|
|
|
mold = request_dict.get('mold', None)
|
|
|
+ qs = Store_Meal.objects
|
|
|
if mold:
|
|
|
- qs = Store_Meal.objects.filter(bucket__mold=1). \
|
|
|
- values("id", "title", "content", "price", "day",
|
|
|
- "currency","bucket__storeDay", "bucket__bucket",
|
|
|
- "bucket__area", "type")
|
|
|
+ qs = qs.filter(bucket__mold=1)
|
|
|
else:
|
|
|
- qs = Store_Meal.objects.filter(bucket__mold=0). \
|
|
|
- values("id", "title", "content", "price", "day",
|
|
|
- "currency", "bucket__storeDay", "bucket__bucket",
|
|
|
- "bucket__area", "type")
|
|
|
+ qs = qs.filter(bucket__mold=0)
|
|
|
+ qs = qs.values("id", "title", "content", "price",
|
|
|
+ "day", "currency","bucket__storeDay",
|
|
|
+ "bucket__bucket", "bucket__area", "type","commodity_code","commodity_type")
|
|
|
if qs.exists():
|
|
|
ql = list(qs)
|
|
|
from operator import itemgetter
|