This commit is contained in:
suyl
2021-07-09 11:13:04 +08:00
parent b7ed047e7c
commit 44f36f7547
2 changed files with 14 additions and 0 deletions

View File

@@ -11,6 +11,16 @@ import (
"time"
)
const (
sounda = "sounda" //提示音a
soundb = "soundb" //提示音b
soundc = "soundc" //提示音c
soundd = "soundd" //提示音d
sounde = "sounde" //报警音e
soundf = "soundf" //报警音f
soundg = "soundg" //报警音g
)
func AddPrinters(c *gin.Context, tokenInfo *model.TokenInfo, appID int, printInfos []*model.PrintInfo) (err error) {
var (
db = globals.GetDB()
@@ -44,6 +54,8 @@ func AddPrinters(c *gin.Context, tokenInfo *model.TokenInfo, appID int, printInf
SIM: v.SIM,
Status: model.PrinterStatusNormal,
IsOnline: model.PrinterOffline,
Sound: sounda,
Volume: 4,
}
if err = dao.Insert(db, printer); err != nil {
errs = append(errs, err)