1e6b81a7532efe995d566782c81L14">14 14
 def tj_data(request):
15
-    ymd = tc.local_string(format='%Y%m%d')
15
+    ymd = int(tc.local_string(format='%Y%m%d'))
16 16
 
17 17
     # 注册用户统计 & 今日注册用户
18 18
     try:
@@ -21,7 +21,7 @@ def tj_data(request):
21 21
         register_num = 0
22 22
 
23 23
     # 注册用户数趋势
24
-    register_trends = RegisterStatisticInfo.objects.filter(status=True).order_by('-pk')[:30]
24
+    register_trends = RegisterStatisticInfo.objects.filter(status=True).order_by('-ymd')[:30]
25 25
     register_trends = [r.data for r in register_trends]
26 26
 
27 27
     # 销量统计 & 今日销量
@@ -31,19 +31,19 @@ def tj_data(request):
31 31
         sale_num = 0
32 32
 
33 33
     # 商品销量趋势
34
-    sale_trends = SaleStatisticInfo.objects.filter(status=True).order_by('-pk')[:30]
34
+    sale_trends = SaleStatisticInfo.objects.filter(status=True).order_by('-ymd')[:30]
35 35
     sale_trends = [s.data for s in sale_trends]
36 36
 
37 37
     # 型号销量统计 & 热销商品榜
38
-    model_sales = ModelSaleStatisticInfo.objects.filter(ymd='0', status=True).order_by('-num')[:3]
38
+    model_sales = ModelSaleStatisticInfo.objects.filter(ymd=0, status=True).order_by('-num')[:3]
39 39
     model_sales = [m.data for m in model_sales]
40 40
 
41 41
     # 经销商销量统计 & 经销商榜
42
-    distributor_sales = DistributorSaleStatisticInfo.objects.filter(ymd='0', status=True).order_by('-num')[:3]
42
+    distributor_sales = DistributorSaleStatisticInfo.objects.filter(ymd=0, status=True).order_by('-num')[:3]
43 43
     distributor_sales = [d.data for d in distributor_sales]
44 44
 
45 45
     # 各地区实时销量
46
-    province_sales = ProvinceSaleStatisticInfo.objects.filter(ymd='0', status=True).order_by('position')
46
+    province_sales = ProvinceSaleStatisticInfo.objects.filter(ymd=0, status=True).order_by('position')
47 47
     province_sales = [p.data for p in province_sales]
48 48
 
49 49
     return response(200, 'Get TJ Data Success', u'获取统计数据成功', {

kodo - Gogs: Go Git Service

説明なし

huangqimin001: 3a0e43ca50 :art: Support GOOD_EXCHANGE_ONLY_ONCE 5 年 前
..
0001_initial.py 3d0d214667 :sparkles: Member Infos 6 年 前
0002_auto_20191119_1428.py 2941e5a938 :art: Right Type 6 年 前
0003_auto_20191119_1446.py 7ba2bde353 :art: Levelx 6 年 前
0004_auto_20191119_2342.py 598d0be866 :art: Add more field for MemberActivity 6 年 前
0005_memberactivityinfo_city.py 8cca797a82 :bug: Fix Bug: response error 6 年 前
0006_auto_20191201_2110.py 4ce7f5c87b :art: Member Relative APIs 6 年 前
0007_auto_20191212_0952.py 608f25d6bc coupons 6 年 前
0008_auto_20191212_1742.py 75ab3f5097 :art: Coupons 6 年 前
0009_auto_20191212_1749.py 75ab3f5097 :art: Coupons 6 年 前
0010_auto_20191212_1821.py 75ab3f5097 :art: Coupons 6 年 前
0011_auto_20191212_1827.py 75ab3f5097 :art: Coupons 6 年 前
0012_auto_20191221_1419.py a8239c077f :art: CouponInfo for coupon app 6 年 前
0013_goodsinfo_only_for_member.py ec4c2109cc only_for_member 6 年 前
0014_auto_20191221_1613.py d1b712e035 Opt coupon 6 年 前
0015_auto_20191221_2058.py e3ff618d3b :art: Filter left_num gt 0 6 年 前
0016_auto_20191223_1808.py d2fce27cd4 :bug: Fix Bug: CouponInfo 6 年 前
0017_goodsorderinfo_integral.py a29f70f92b migrate 5 年 前
0018_memberactivityinfo_is_signup.py 019d571675 MemberActivityInfo 添加 is_signup 5 年 前
0019_auto_20201202_1203.py 6a9e324f6f :art: Re Makemigrations 5 年 前
0020_memberactivityinfo_group_share_max_integral.py 7c5d960672 :art: Makemigrations 5 年 前
0021_auto_20201203_1140.py 8d41a46f32 add default = '' 5 年 前
0022_auto_20201203_1500.py b2220dd77c MemberActivityInfo default 5 年 前
0023_memberactivityinfo_activity_state.py dfa7892487 MemberActivityInfo add activity_state 5 年 前
0024_auto_20201204_1831.py 3794a9fc67 添加接口 admin/member/activity/share/list 5 年 前
0025_auto_20210107_1834.py 2f29c70d66 :art: TEMPLATE_ID_TRACKING 5 年 前
0026_goodsorderinfo_send_template_message_res.py 5de59f57d6 记录发送订阅消息结果 5 年 前
0027_goodsorderinfo_remark.py 5444cf4170 添加备注,支持自定义模板消息备注 5 年 前
0028_auto_20210115_1108.py 3cc529c04c fix 会员活动分享 group_share_id 唯一 5 年 前
0029_goodsinfo_only_once.py 3a0e43ca50 :art: Support GOOD_EXCHANGE_ONLY_ONCE 5 年 前
__init__.py 3d0d214667 :sparkles: Member Infos 6 年 前