aa
This commit is contained in:
@@ -43,8 +43,10 @@ func AddPrinter(appID int, printers []*model.Printer) (err error) {
|
|||||||
Name: v.Name,
|
Name: v.Name,
|
||||||
SIM: v.SIM,
|
SIM: v.SIM,
|
||||||
Status: model.PrinterStatusOffline,
|
Status: model.PrinterStatusOffline,
|
||||||
Sound: sounda, //默认一个
|
Sound: v.Sound,
|
||||||
Volume: 4, //默认音量
|
}
|
||||||
|
if v.Volume == 0 {
|
||||||
|
printer.Volume = 4
|
||||||
}
|
}
|
||||||
dao.WrapAddIDCULDEntity(printer, "")
|
dao.WrapAddIDCULDEntity(printer, "")
|
||||||
if err = dao.CreateEntity(db, printer); err != nil {
|
if err = dao.CreateEntity(db, printer); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user