|
@@ -30,9 +30,30 @@ def query_cloud_storage(request):
|
|
|
tko = TokenObject(token)
|
|
|
response.lang = tko.lang
|
|
|
if tko.code == 0:
|
|
|
- # qs = Store_Meal.objects.filter(bu)
|
|
|
- # qs = Store_Meal.objects.filter()
|
|
|
- # qs = Store_Meal.objects.filter(buckettyp)
|
|
|
+ qs = Store_Meal.objects.filter(bucket__mold=1)
|
|
|
+ qs = qs.values("id", "title", "price", "content", "day",
|
|
|
+ "add_time", "update_time", "currency",
|
|
|
+ "type", "bucket_id", "bucket__bucket",
|
|
|
+ "bucket__storeDay")
|
|
|
+ res = CommonService.qs_to_list(qs)
|
|
|
+ return response.json(0, res)
|
|
|
+ else:
|
|
|
+ return response.json(tko.code)
|
|
|
+
|
|
|
+
|
|
|
+def query_cloud_storage(request):
|
|
|
+ request.encoding = 'utf-8'
|
|
|
+ response = ResponseObject()
|
|
|
+ if request.method == 'POST':
|
|
|
+ request_dict = request.POST
|
|
|
+ elif request.method == 'GET':
|
|
|
+ request_dict = request.GET
|
|
|
+ else:
|
|
|
+ return response.json(444)
|
|
|
+ token = request_dict.get('token', None)
|
|
|
+ tko = TokenObject(token)
|
|
|
+ response.lang = tko.lang
|
|
|
+ if tko.code == 0:
|
|
|
qs = Store_Meal.objects.filter(bucket__mold=1)
|
|
|
qs = qs.values("id", "title", "price", "content", "day",
|
|
|
"add_time", "update_time", "currency",
|