@@ -108,7 +108,7 @@ def clerk_sale_submit_api(request): |
||
108 | 108 |
distributor = DistributorInfo.objects.get(pk=distributorID) |
109 | 109 |
except DistributorInfo.DoesNotExist: |
110 | 110 |
return response(ProductDistributorStatusCode.DISTRIBUTOR_NOT_FOUND) |
111 |
- except ValueError: |
|
111 |
+ except ValueError: |
|
112 | 112 |
return response(ProductDistributorStatusCode.DISTRIBUTOR_NOT_FOUND) |
113 | 113 |
|
114 | 114 |
integral = model.integral |
@@ -22,7 +22,7 @@ def tj_data(request): |
||
22 | 22 |
register_num = 0 |
23 | 23 |
|
24 | 24 |
# 注册用户数趋势 |
25 |
- register_trends = RegisterStatisticInfo.objects.filter(status=True).order_by('-ymd')[:30] |
|
25 |
+ register_trends = RegisterStatisticInfo.objects.filter(status=True).order_by('-ymd') |
|
26 | 26 |
register_trends = [r.data for r in register_trends] |
27 | 27 |
|
28 | 28 |
# 销量统计 & 今日销量 |
@@ -32,15 +32,15 @@ def tj_data(request): |
||
32 | 32 |
sale_num = 0 |
33 | 33 |
|
34 | 34 |
# 商品销量趋势 |
35 |
- sale_trends = SaleStatisticInfo.objects.filter(status=True).order_by('-ymd')[:30] |
|
35 |
+ sale_trends = SaleStatisticInfo.objects.filter(status=True).order_by('-ymd') |
|
36 | 36 |
sale_trends = [s.data for s in sale_trends] |
37 | 37 |
|
38 | 38 |
# 型号销量统计 & 热销商品榜 |
39 |
- model_sales = ModelSaleStatisticInfo.objects.filter(ymd=0, status=True).order_by('-num')[:3] |
|
39 |
+ model_sales = ModelSaleStatisticInfo.objects.filter(ymd=0, status=True).order_by('-num') |
|
40 | 40 |
model_sales = [m.data for m in model_sales] |
41 | 41 |
|
42 | 42 |
# 经销商销量统计 & 经销商榜 |
43 |
- distributor_sales = DistributorSaleStatisticInfo.objects.filter(ymd=0, status=True).order_by('-num')[:3] |
|
43 |
+ distributor_sales = DistributorSaleStatisticInfo.objects.filter(ymd=0, status=True).order_by('-num') |
|
44 | 44 |
distributor_sales = [d.data for d in distributor_sales] |
45 | 45 |
|
46 | 46 |
# 各地区实时销量 |