Przeglądaj źródła

查询支付成功的订单

locky 3 lat temu
rodzic
commit
c985dfa69e
1 zmienionych plików z 12 dodań i 12 usunięć
  1. 12 12
      AdminController/ServeManagementController.py

+ 12 - 12
AdminController/ServeManagementController.py

@@ -1118,18 +1118,18 @@ class serveManagement(View):
                     continue
                 name = store_meal[0]['lang__title']+'-'+store_meal[0]['lang__content']
                 order = Order_Model.objects.filter(rank__bucket_id=vod_bucket_id)
-                Jan_count = order.filter(addTime__range=[Jan, Feb]).count()
-                Feb_count = order.filter(addTime__range=[Feb, Mar]).count()
-                Mar_count = order.filter(addTime__range=[Mar, Apr]).count()
-                Apr_count = order.filter(addTime__range=[Apr, May]).count()
-                May_count = order.filter(addTime__range=[May, Jun]).count()
-                Jun_count = order.filter(addTime__range=[Jun, Jul]).count()
-                Jul_count = order.filter(addTime__range=[Jul, Aug]).count()
-                Aug_count = order.filter(addTime__range=[Aug, Sep]).count()
-                Sep_count = order.filter(addTime__range=[Sep, Oct]).count()
-                Oct_count = order.filter(addTime__range=[Oct, Nov]).count()
-                Nov_count = order.filter(addTime__range=[Nov, Dec]).count()
-                Dec_count = order.filter(addTime__range=[Dec, Jan_next]).count()
+                Jan_count = order.filter(status=1, addTime__range=[Jan, Feb]).count()
+                Feb_count = order.filter(status=1, addTime__range=[Feb, Mar]).count()
+                Mar_count = order.filter(status=1, addTime__range=[Mar, Apr]).count()
+                Apr_count = order.filter(status=1, addTime__range=[Apr, May]).count()
+                May_count = order.filter(status=1, addTime__range=[May, Jun]).count()
+                Jun_count = order.filter(status=1, addTime__range=[Jun, Jul]).count()
+                Jul_count = order.filter(status=1, addTime__range=[Jul, Aug]).count()
+                Aug_count = order.filter(status=1, addTime__range=[Aug, Sep]).count()
+                Sep_count = order.filter(status=1, addTime__range=[Sep, Oct]).count()
+                Oct_count = order.filter(status=1, addTime__range=[Oct, Nov]).count()
+                Nov_count = order.filter(status=1, addTime__range=[Nov, Dec]).count()
+                Dec_count = order.filter(status=1, addTime__range=[Dec, Jan_next]).count()
                 data = [Jan_count, Feb_count, Mar_count, Apr_count, May_count, Jun_count, Jul_count, Aug_count, Sep_count,
                         Oct_count, Nov_count, Dec_count]