commit by Kalman.CHENG ☆
This commit is contained in:
22
dsLightRag/Util/PersonUtil.py
Normal file
22
dsLightRag/Util/PersonUtil.py
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
Reference in New Issue
Block a user