1
This commit is contained in:
@@ -36,19 +36,15 @@ func (c *PrinterHandler) GetVendorID() int {
|
||||
|
||||
func (c *PrinterHandler) PrintMsg(ctx *jxcontext.Context, id1, id2, msgTitle, msgContent string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
globals.SugarLogger.Debugf("PrintMsg id1:%s", id1)
|
||||
if id1 != "" {
|
||||
if globals.EnableStoreWrite {
|
||||
_, err = api.JxPrintAPI.DoPrint(id1, msgContent, utils.Str2Int(id2))
|
||||
}
|
||||
if err == nil {
|
||||
printerStatus, err = c.GetPrinterStatus(ctx, id1, "")
|
||||
}
|
||||
} else {
|
||||
printerStatus = &partner.PrinterStatus{
|
||||
PrintResult: partner.PrintResultNoPrinter,
|
||||
if id1 != "" && globals.EnableStoreWrite {
|
||||
if _, err := api.JxPrintAPI.DoPrint(id1, msgContent, utils.Str2Int(id2)); err == nil {
|
||||
return c.GetPrinterStatus(ctx, id1, "")
|
||||
}
|
||||
}
|
||||
return nil, err
|
||||
printerStatus = &partner.PrinterStatus{
|
||||
PrintResult: partner.PrintResultNoPrinter,
|
||||
}
|
||||
return printerStatus, err
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) GetPrinterStatus(ctx *jxcontext.Context, id1, id2 string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
|
||||
Reference in New Issue
Block a user