from flask import Blueprint from user.user_auth import verify_token from company.company_obj import CompanyIndex company_route = Blueprint('company', __name__) @company_route.route('/head_info', methods=['GET']) @verify_token def head_info_route(**kwargs): company = CompanyIndex() company.cid = kwargs['cid'] result = company.get_head_info() return {"info": "查询结果", "result": result}, 200 @company_route.route('/basic_info', methods=['GET']) @verify_token def basic_info_route(**kwargs): company = CompanyIndex() company.cid = kwargs['cid'] result = company.get_basic_info() return {"info": "查询结果", "result": result}, 200 @company_route.route('/cc_rating', methods=['GET']) @verify_token def cc_rating_route(**kwargs): company_index = CompanyIndex() company_index.cid = kwargs['cid'] result = company_index.get_cc_rating() return {"info": "查询结果", "result": result}, 200 @company_route.route('/industry_analysis', methods=['GET']) @verify_token def industry_analysis_route(**kwargs): """ 行业分析 """ company_index = CompanyIndex() company_index.cid = kwargs['cid'] result = company_index.get_industry_analysis() return {"info": "查询结果", "result": result} @company_route.route('/esg_rating', methods=['GET']) @verify_token def esg_rating_route(**kwargs): """ ESG分析数据 Parameters: param desc Returns: res: desc """ company_index = CompanyIndex() company_index.cid = kwargs['cid'] result = company_index.get_esg_rating() return {"info": "查询结果", "result": result}