1
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user