|
@@ -5,7 +5,7 @@
|
|
@File :Cloudsum.py
|
|
@File :Cloudsum.py
|
|
@IDE :PyCharm
|
|
@IDE :PyCharm
|
|
"""
|
|
"""
|
|
-from Model.models import Order_Model, UID_Bucket, UserExModel, App_Info
|
|
|
|
|
|
+from Model.models import Order_Model, UID_Bucket, UserExModel
|
|
from Object.ResponseObject import ResponseObject
|
|
from Object.ResponseObject import ResponseObject
|
|
from Object.TokenObject import TokenObject
|
|
from Object.TokenObject import TokenObject
|
|
from django.views import View
|
|
from django.views import View
|
|
@@ -59,9 +59,9 @@ class Cloudsum(View):
|
|
if own_permission is not True:
|
|
if own_permission is not True:
|
|
return response.json(404)
|
|
return response.json(404)
|
|
res = UserExModel.objects.extra(tables=['app_info'],
|
|
res = UserExModel.objects.extra(tables=['app_info'],
|
|
- select={'appname':'App_Info.appName',
|
|
|
|
- 'appversion':'App_Info.newAppversion'},
|
|
|
|
- where=["user_ex.appBundleId=app_Info.appBundleId"]).\
|
|
|
|
|
|
+ select={'appname':'app_info.appName',
|
|
|
|
+ 'appversion':'app_info.newAppversion'},
|
|
|
|
+ where=["user_ex.appBundleId=app_info.appBundleId"]).\
|
|
values('appBundleId','appname','appversion').annotate(dates=Count('appBundleId')).order_by()
|
|
values('appBundleId','appname','appversion').annotate(dates=Count('appBundleId')).order_by()
|
|
print(res.query)
|
|
print(res.query)
|
|
print(res)
|
|
print(res)
|
|
@@ -90,7 +90,7 @@ class Cloudsum(View):
|
|
# 类型:云存服务统计
|
|
# 类型:云存服务统计
|
|
# 统计开通云存的设备有多少台√
|
|
# 统计开通云存的设备有多少台√
|
|
# 统计未支付,支付成功的订单√
|
|
# 统计未支付,支付成功的订单√
|
|
- # 统计开通云存的增长率 (每个月开通云存的总数)√
|
|
|
|
|
|
+ # 统计开通云存的增长率 (每个月开通云存套餐的总数)√
|
|
# 统计已开通云存的各套餐总数√
|
|
# 统计已开通云存的各套餐总数√
|
|
# 统计已支付的订单总金额√
|
|
# 统计已支付的订单总金额√
|
|
def cloudservicesum(self, userID, response):
|
|
def cloudservicesum(self, userID, response):
|
|
@@ -111,7 +111,7 @@ class Cloudsum(View):
|
|
}
|
|
}
|
|
return response.json(0, data_dict)
|
|
return response.json(0, data_dict)
|
|
|
|
|
|
- # 每个月开通云存的总数
|
|
|
|
|
|
+ # 每个月开通云存套餐的总数
|
|
def usercloud(self, userID, response):
|
|
def usercloud(self, userID, response):
|
|
own_permission = ModelService.check_perm(userID=userID, permID=30)
|
|
own_permission = ModelService.check_perm(userID=userID, permID=30)
|
|
if own_permission is not True:
|
|
if own_permission is not True:
|