|
|
|
@ -78,7 +78,7 @@ async def get_chat_log_by_session(mysql_pool, current_user, person_id, page=1, p
|
|
|
|
|
|
|
|
|
|
# 查询分页数据,按 id 降序排列
|
|
|
|
|
await cur.execute(
|
|
|
|
|
"SELECT SQL_NO_CACHE id, person_id, user_input, model_response, audio_url, duration, create_time "
|
|
|
|
|
"SELECT id, person_id, user_input, model_response, audio_url, duration, create_time "
|
|
|
|
|
"FROM t_chat_log WHERE person_id = %s ORDER BY id DESC LIMIT %s OFFSET %s",
|
|
|
|
|
(person_id, page_size, offset)
|
|
|
|
|
)
|
|
|
|
@ -184,8 +184,7 @@ async def get_chat_logs_by_risk_flag(mysql_pool, risk_flag: int, offset: int, pa
|
|
|
|
|
async with conn.cursor() as cursor:
|
|
|
|
|
# 查询符合条件的记录
|
|
|
|
|
sql = """
|
|
|
|
|
SELECT SQL_NO_CACHE
|
|
|
|
|
tcl.id, tcl.user_input, tcl.model_response, tcl.audio_url, tcl.duration,
|
|
|
|
|
SELECT tcl.id, tcl.user_input, tcl.model_response, tcl.audio_url, tcl.duration,
|
|
|
|
|
tcl.create_time, tcl.risk_flag, tcl.risk_memo, tcl.risk_result,
|
|
|
|
|
tbp.person_id, tbp.login_name, tbp.person_name
|
|
|
|
|
FROM t_chat_log AS tcl
|
|
|
|
|