1
This commit is contained in:
@@ -66,11 +66,15 @@ func AddPrinter(appID int, printers []*model.Printer) (err error) {
|
||||
IccID: v.IccID,
|
||||
Status: model.PrinterStatusOffline,
|
||||
Sound: v.Sound,
|
||||
UserId: "system",
|
||||
}
|
||||
if v.Volume == 0 {
|
||||
printer.Volume = 4
|
||||
}
|
||||
if v.UserId == "" {
|
||||
printer.UserId = "system"
|
||||
} else {
|
||||
printer.UserId = v.UserId
|
||||
}
|
||||
dao.WrapAddIDCULDEntity(printer, "")
|
||||
if err = dao.CreateEntity(db, printer); err != nil {
|
||||
errs = append(errs, err)
|
||||
|
||||
Reference in New Issue
Block a user