注释文档
This commit is contained in:
parent
bec8677ec8
commit
ba3a7f2ded
|
@ -4,6 +4,9 @@ from DBHelper.MongoHelper import MongoHelper
|
|||
|
||||
|
||||
def get_monitor_data_impl():
|
||||
"""
|
||||
监测数据
|
||||
"""
|
||||
db = MongoHelper("tfse_v0.21")
|
||||
monitor_data = dict()
|
||||
|
||||
|
@ -36,6 +39,9 @@ def get_monitor_data_impl():
|
|||
|
||||
|
||||
def get_rating_static_impl():
|
||||
"""
|
||||
评价统计查询
|
||||
"""
|
||||
db = MongoHelper("tfse_v0.21")
|
||||
|
||||
# 日期正则表达式 20xx-xx-xx格式
|
||||
|
@ -71,6 +77,9 @@ def get_rating_static_impl():
|
|||
|
||||
|
||||
def get_industry_distribute_impl():
|
||||
"""
|
||||
行业分布数据查询
|
||||
"""
|
||||
db = MongoHelper("tfse_v0.21")
|
||||
|
||||
records = db.find_data_with_aggregate(
|
||||
|
@ -87,12 +96,16 @@ def get_industry_distribute_impl():
|
|||
for data in records:
|
||||
values = list(data.values())
|
||||
result.append({values[0]: values[1]})
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def get_new_companies_impl(page_size, page_no):
|
||||
|
||||
"""
|
||||
按照注册时间倒序返回新增企业信息
|
||||
page_size: 每页数据条数
|
||||
page_no: 当前页码
|
||||
return: 查询结果
|
||||
"""
|
||||
db = MongoHelper("tfse_v0.21")
|
||||
|
||||
records = db.find_data_by_page_with_sort(
|
||||
|
|
|
@ -21,4 +21,4 @@ class DashBoard:
|
|||
|
||||
@staticmethod
|
||||
def get_new_companies(page_size, page_no):
|
||||
return get_new_companies_impl(page_size, page_no)
|
||||
return get_new_companies_impl(page_size, page_no)
|
||||
|
|
Loading…
Reference in New Issue