编译处理。
This commit is contained in:
21
SqlOpr.cpp
21
SqlOpr.cpp
@@ -464,6 +464,27 @@ bool RepaySqlOpr::deleteRepayRecord(int32_t id)
|
||||
return query.numRowsAffected() > 0;
|
||||
}
|
||||
|
||||
bool RepaySqlOpr::deleteRepayRecordByAccID(int32_t id)
|
||||
{
|
||||
lastErr_.clear();
|
||||
|
||||
if (!db_.isOpen()) {
|
||||
lastErr_ = "Database is not open";
|
||||
return false;
|
||||
}
|
||||
|
||||
QSqlQuery query(db_);
|
||||
query.prepare("DELETE FROM repay_record WHERE accID = :id");
|
||||
query.bindValue(":id", id);
|
||||
|
||||
if (!query.exec()) {
|
||||
lastErr_ = query.lastError().text().toStdString();
|
||||
return false;
|
||||
}
|
||||
|
||||
return query.numRowsAffected() > 0;
|
||||
}
|
||||
|
||||
const std::string& RepaySqlOpr::GetLastErr()
|
||||
{
|
||||
return lastErr_;
|
||||
|
||||
Reference in New Issue
Block a user