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