From a0df63506b43486b8cec53ea05ed28b7cdb0c09e Mon Sep 17 00:00:00 2001 From: kejingfan Date: Tue, 30 Jul 2024 23:40:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B6=88=E8=B4=B9=E6=97=B6=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E4=BA=A4=E6=98=93=E8=AE=B0=E5=BD=95=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=BA1=EF=BC=8C=E5=B7=B2=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumePage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumePage.cpp b/consumePage.cpp index 9f8ad07..81b1185 100644 --- a/consumePage.cpp +++ b/consumePage.cpp @@ -243,7 +243,7 @@ bool MainWindow::deductCard(QString cardId, double deductValue, double &original } QDateTime currentTime = QDateTime::currentDateTime(); - recordId = getRecordId(currentTime, userId, 1); + recordId = getRecordId(currentTime, userId, 0); query.finish(); query.prepare(QString("call sp_consumeCard (:cardId, :value, :recordId, :device, :time, :type, @newBalance);")); @@ -252,7 +252,7 @@ bool MainWindow::deductCard(QString cardId, double deductValue, double &original query.bindValue(":recordId", recordId); query.bindValue(":device", device.getId()); query.bindValue(":time", currentTime.toString("yyyy-MM-dd hh:mm:ss")); - query.bindValue(":type", 1); + query.bindValue(":type", 0); success = query.exec(); if (!success) {