From 1dc582918403fd56d41e64501b1bc5524791bd59 Mon Sep 17 00:00:00 2001 From: wang fei Date: Fri, 28 Oct 2022 16:55:28 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8Ddde-osd=E7=9A=84GetR?= =?UTF-8?q?ecordsFromId=E6=8E=A5=E5=8F=A3=E8=B0=83=E7=94=A8=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因:sqlcmd未prepare,未执行数据库查询,接口返回错误 修改:添加 m_query.prepare(sqlCmd) Log: 修复dde-osd的GetRecordsFromId接口调用失败问题 Influence: GetRecordsFromId接口 --- dde-osd/notification/persistence.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dde-osd/notification/persistence.cpp b/dde-osd/notification/persistence.cpp index 4b5e6c725..75d700d5c 100644 --- a/dde-osd/notification/persistence.cpp +++ b/dde-osd/notification/persistence.cpp @@ -344,6 +344,7 @@ QString Persistence::getFrom(int rowCount, const QString &offsetId) sqlCmd += TableName_v2; sqlCmd += QString(" LIMIT (:rowCount) OFFSET (:offset)"); + m_query.prepare(sqlCmd); m_query.bindValue(":rowCount", rowCount); m_query.bindValue(":offset", rowNum);