Refine
This commit is contained in:
5
main.py
5
main.py
@@ -2194,7 +2194,7 @@ async def fastapi_query_all_records_by_ids_date_type(ids:str, querydate: str, qu
|
||||
async def fastapi_query_all_records_by_date_property(querydate: str, querytype: str, property: str) -> list[dict]:
|
||||
# 缓存查询结果提高性能
|
||||
global redis_client
|
||||
cache_key = f"{querydate}_{querytype}_{property}"
|
||||
cache_key = f"queryallrecordsbydateproperty_{querydate}_{querytype}_{property}"
|
||||
data = redis_client.get(cache_key)
|
||||
if data:
|
||||
# 使用自定义的反序列化函数
|
||||
@@ -2294,7 +2294,8 @@ async def fastapi_query_all_scheme_all_records(schemetype: str, schemename: str,
|
||||
|
||||
return results
|
||||
|
||||
|
||||
# DingZQ, 2025-03-21
|
||||
# 缓存是用的queryallschemeallrecords的缓存
|
||||
@app.get("/queryschemeallrecordsproperty/")
|
||||
async def fastapi_query_all_scheme_all_records_property(schemetype: str, schemename: str, querydate: str, querytype: str, queryproperty: str) -> list:
|
||||
# 缓存查询结果提高性能
|
||||
|
||||
Reference in New Issue
Block a user