diff --git a/business/model/dao/dao_print.go b/business/model/dao/dao_print.go index a0bf9b534..bea5c2622 100644 --- a/business/model/dao/dao_print.go +++ b/business/model/dao/dao_print.go @@ -151,17 +151,14 @@ 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 func() { - if r := recover(); r != nil { - Rollback(db, tx) - } - }() defer Commit(db, tx) - if err = GetRowsTx(tx, &print, sql, sqlParams...); err != nil { Rollback(db, tx) return nil, 0, err } + globals.SugarLogger.Debugf("----sql := %s", sql) + globals.SugarLogger.Debugf("----sqlParams := %s", utils.Format4Output(sqlParams, false)) count = GetLastTotalRowCountTx(tx) + return print, count, err }