添加count

This commit is contained in:
邹宗楠
2025-12-24 14:57:46 +08:00
parent b4c5df3616
commit e3fdcd179a
3 changed files with 24 additions and 8 deletions

View File

@@ -221,7 +221,7 @@ func (c *ApiController) AddPrinter(dataMap map[string]interface{}) (data, errCod
type QueryPrintList struct {
}
func (c *ApiController) QueryPrintList(dataMap map[string]interface{}) (data []*model.Printer, errCode string, err error) {
func (c *ApiController) QueryPrintList(dataMap map[string]interface{}) (data map[string]interface{}, errCode string, err error) {
var (
printNo string
printKey string
@@ -261,7 +261,11 @@ func (c *ApiController) QueryPrintList(dataMap map[string]interface{}) (data []*
} else {
size = s
}
data, err = cms.QueryPrintList(printNo, printKey, status, isOnline, page, size)
list, count, err := cms.QueryPrintList(printNo, printKey, status, isOnline, page, size)
data = map[string]interface{}{
"printList": list,
"count": count,
}
return
}