Commit 9bb3ffbc authored by 李宗熹's avatar 李宗熹

一年内无净值更新的基金不提供评价

parent b85464ee
......@@ -30,10 +30,17 @@ class FundEvaluation(Resource):
self.parser.add_argument('fund_id', type=str, required=True, help='基金id不能为空')
self.parser.add_argument('type', type=int, required=True, help='基金类型不能为空')
args = self.parser.parse_args()
data = single_evaluation(fund_id=args.get('fund_id'), invest_type=args.get('type'))
resp = {
"statusCode": "0000",
"message": "成功",
"attributes": data
}
try:
data = single_evaluation(fund_id=args.get('fund_id'), invest_type=args.get('type'))
resp = {
"statusCode": "0000",
"message": "成功",
"attributes": data
}
except:
resp = {
"statusCode": "9999",
"message": "该基金最近一年无净值更新,暂不提供该基金评价。",
"attributes": ""
}
return resp
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