修复了风格接口无法正确获取的问题
This commit is contained in:
parent
bebdba3c4b
commit
0653355c5e
Binary file not shown.
@ -141,11 +141,12 @@ class PromptService:
|
||||
with self.db_pool.get_connection() as conn:
|
||||
cursor = conn.cursor(dictionary=True)
|
||||
cursor.execute(
|
||||
"SELECT description FROM contentStyle WHERE styleName = %s AND isDelete = 0",
|
||||
"SELECT description FROM contentStyle WHERE styleName = %s",
|
||||
(style_name,)
|
||||
)
|
||||
result = cursor.fetchone()
|
||||
if result:
|
||||
logger.info(f"从数据库获取风格提示词: {style_name}")
|
||||
return result['description']
|
||||
except Exception as e:
|
||||
logger.error(f"从数据库获取风格提示词失败: {e}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user