tfse-app-api-v0.2/company/CompanyIndex.py

23 lines
527 B
Python
Raw Normal View History

2021-12-17 17:15:20 +08:00
from company.scripts import basic_info_script, general_rating_script
2021-12-13 16:04:10 +08:00
class CompanyIndex:
def __init__(self):
self.cid = None
def basic_info_obj(self):
result = basic_info_script(self.cid)
2021-12-13 16:22:20 +08:00
if result:
return "查询成功", result[0]
else:
return "无数据", {}
2021-12-17 17:15:20 +08:00
def general_rating_obj(self):
result = general_rating_script(self.cid)
if result:
return "查询成功", result[0]
else:
return "无数据", {}