Files
dsProject/dsLightRag/Util/PersonUtil.py
2025-09-11 15:10:25 +08:00

22 lines
687 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import logging
from Util.Database import find_by_sql
# 配置日志
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLogger(__name__)
################################
# 功能根据person_id获取人员信息
# 作者Kalman.CHENG ☆
# 时间2025-09-09
# 备注:
################################
async def get_person_info(person_id):
select_person_sql: str = f"select * from t_sys_loginperson where person_id = '{person_id}' and b_use = 1"
select_person_result = await find_by_sql(select_person_sql, ())
if select_person_result:
return select_person_result[0]
else:
return None