修复了财报搜索接口使用关键词查询时的总是返回空值的问题
This commit is contained in:
parent
4cf37185cd
commit
01c80653d9
@ -51,8 +51,8 @@ async def financial_reports_query_service(
|
||||
# 如果没有匹配的股票代码,返回空查询
|
||||
query_set = query_set.none()
|
||||
elif keyword_type == "code":
|
||||
# 精确查询股票代码字段
|
||||
query_set = query_set.filter(stock_code=search_keyword)
|
||||
# 模糊查询代码
|
||||
query_set = query_set.filter(stock_code__icontains=search_keyword)
|
||||
elif keyword_type == "chinese":
|
||||
# 模糊查询股票名称字段
|
||||
query_set = query_set.filter(stock_name__icontains=search_keyword)
|
||||
|
Loading…
Reference in New Issue
Block a user