Commit 533a1b76 by dong

fix20221209

parent 9ad3ec47
......@@ -100,17 +100,21 @@ def get_cluster():
def industry_cluster():
req_dic = request.get_json()
industry_name = req_dic['industry_name']
industry_obj = IndustryChain.query.filter_by(industry_name=industry_name).first()
industry_id = industry_obj.id
result = {
"industryChain": industry_name,
"nodeList": [find_up_thr1(1, industry_id),
find_up_thr1(2, industry_id),
find_up_thr1(3, industry_id)]
}
print(result)
return result
try:
industry_obj = IndustryChain.query.filter_by(industry_name=industry_name).first()
industry_id = industry_obj.id
result = {
"industryChain": industry_name,
"nodeList": [find_up_thr1(1, industry_id),
find_up_thr1(2, industry_id),
find_up_thr1(3, industry_id)]
}
print(result)
except Exception as e:
current_app.logger.error(e)
return jsonify(code=RET.DBERR, msg="数据异常")
return jsonify(code=RET.OK, msg="获取成功", data=result)
def get_count(chain_name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment