This commit is contained in:
邹宗楠
2022-08-25 16:10:01 +08:00
parent be87623211
commit 66db5867a4
49 changed files with 2364 additions and 649 deletions

18
dao/print_activation.go Normal file
View File

@@ -0,0 +1,18 @@
package dao
import "git.rosy.net.cn/jx-print/globals"
type PrintActivation struct {
}
var PrintActivationDao = new(PrintActivation)
// QueryPrintHeartBeat 查询打印机是否心跳监听正常
func (p *PrintActivation) QueryPrintHeartBeat(printNo string) (bool, error) {
count := 0
err := globals.GetDB().QueryRow(`SELECT count(print_no) FROM print_activation WHERE print_no = ?`, []interface{}{printNo}...).Scan(&count)
if err != nil {
return false, err
}
return count == 1, nil
}