world/wwwroot/api/get_search_status.dspy

9 lines
421 B
Plaintext

result = [{"value": "", "text": "全部"}]
try:
async with get_sor_context(request._run_ns, "world") as sor:
rows = await sor.sqlExe("select k as value, v as text from appcodes_kv where parentid='world_status' order by k", {})
return [{"value": "", "text": "全部"}] + [{"value": r.value, "text": r.text} for r in rows]
except Exception as e:
debug(f"get_search_status error: {e}")
return result