diff --git a/src/financial_reports/service.py b/src/financial_reports/service.py index bc5e11c..7c3fee6 100644 --- a/src/financial_reports/service.py +++ b/src/financial_reports/service.py @@ -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)