1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-print/globals"
|
||||
"git.rosy.net.cn/jx-print/model"
|
||||
"git.rosy.net.cn/jx-print/putils"
|
||||
"git.rosy.net.cn/jx-print/services/print_server"
|
||||
@@ -62,6 +63,8 @@ func GetPrinters(c *gin.Context) {
|
||||
}
|
||||
if !CallFunc(c, func() (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = print_server.GetPrinters(c, param.AppID, param.PrintNo, param.Name, param.Status, param.IsOnline, param.Offset, param.PageSize)
|
||||
globals.SugarLogger.Debug("printer err ==========", err)
|
||||
globals.SugarLogger.Debug("printer data ==========", retVal)
|
||||
return retVal, "", err
|
||||
}) {
|
||||
return
|
||||
|
||||
13
dao/printer_test.go
Normal file
13
dao/printer_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-print/globals"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetPrinters(t *testing.T) {
|
||||
data, err := GetPrintersPage(globals.GetDB(), 1000, "", "", -9, -9, 0, 10, "")
|
||||
fmt.Println("data=======", data)
|
||||
fmt.Println("data=======", err)
|
||||
}
|
||||
Reference in New Issue
Block a user