This commit is contained in:
邹宗楠
2025-12-24 16:54:27 +08:00
parent 3651bf0e1d
commit ce6b120f23

View File

@@ -151,7 +151,6 @@ func QueryPrintList(db *DaoDB, printNo, printKey string, status, isOnline int64,
sql += ` ORDER BY status desc,is_online desc LIMIT ? OFFSET ? `
sqlParams = append(sqlParams, size, page)
tx, _ := Begin(db)
defer Commit(db, tx)
if err = GetRowsTx(tx, &print, sql, sqlParams...); err != nil {
Rollback(db, tx)
return nil, 0, err
@@ -159,6 +158,7 @@ func QueryPrintList(db *DaoDB, printNo, printKey string, status, isOnline int64,
globals.SugarLogger.Debugf("----sql := %s", sql)
globals.SugarLogger.Debugf("----sqlParams := %s", utils.Format4Output(sqlParams, false))
count = GetLastTotalRowCountTx(tx)
defer Commit(db, tx)
return print, count, err
}