From ce6b120f2340f792a638581beaad54180f9685a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 24 Dec 2025 16:54:27 +0800 Subject: [PATCH] 1 --- business/model/dao/dao_print.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/model/dao/dao_print.go b/business/model/dao/dao_print.go index bea5c2622..f23e13541 100644 --- a/business/model/dao/dao_print.go +++ b/business/model/dao/dao_print.go @@ -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 }