- IPrinterHandler添加EmptyPrintList与PlayText
- 易联云打印机播放:用户申请取消订单请注意查看,收到新的售后单请查看
This commit is contained in:
@@ -26,6 +26,9 @@ type IPrinterHandler interface {
|
||||
RebindPrinter(ctx *jxcontext.Context, lastBindResult *BindPrinterResult) (bindResult *BindPrinterResult, err error)
|
||||
|
||||
PrintOrder(ctx *jxcontext.Context, store *model.Store, order *model.GoodsOrder) (printerStatus *PrinterStatus, err error)
|
||||
|
||||
EmptyPrintList(ctx *jxcontext.Context, id1, id2 string) (err error)
|
||||
PlayText(ctx *jxcontext.Context, id1, id2, orderID, text string) (printerStatus *PrinterStatus, err error)
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -169,3 +169,12 @@ func (c *PrinterHandler) BindPrinter(ctx *jxcontext.Context, mapData map[string]
|
||||
func (c *PrinterHandler) RebindPrinter(ctx *jxcontext.Context, lastBindResult *partner.BindPrinterResult) (bindResult *partner.BindPrinterResult, err error) {
|
||||
return nil, fmt.Errorf("%s打印机当前不支持扫码绑定", model.VendorChineseNames[model.VendorIDFeiE])
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) EmptyPrintList(ctx *jxcontext.Context, id1, id2 string) (err error) {
|
||||
err = api.FeieAPI.DelPrinterSqs(id1)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PlayText(ctx *jxcontext.Context, id1, id2, orderID, text string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
return c.GetPrinterStatus(ctx, id1, id2)
|
||||
}
|
||||
|
||||
@@ -267,3 +267,11 @@ func (c *PrinterHandler) BindPrinter(ctx *jxcontext.Context, mapData map[string]
|
||||
func (c *PrinterHandler) RebindPrinter(ctx *jxcontext.Context, lastBindResult *partner.BindPrinterResult) (bindResult *partner.BindPrinterResult, err error) {
|
||||
return nil, fmt.Errorf("%s打印机当前不支持扫码绑定", model.VendorChineseNames[model.VendorIDXiaoWM])
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) EmptyPrintList(ctx *jxcontext.Context, id1, id2 string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PlayText(ctx *jxcontext.Context, id1, id2, orderID, text string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
return c.GetPrinterStatus(ctx, id1, id2)
|
||||
}
|
||||
|
||||
@@ -182,3 +182,13 @@ func getApiByToken(possibleToken string) *yilianyunapi.API {
|
||||
}
|
||||
return api.YilianyunAPI
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) EmptyPrintList(ctx *jxcontext.Context, id1, id2 string) (err error) {
|
||||
err = api.YilianyunAPI.CancelAll(id1, id2)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PlayText(ctx *jxcontext.Context, id1, id2, orderID, text string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
err = api.YilianyunAPI.PlayText(id1, orderID, text, id2)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -164,3 +164,12 @@ func (c *PrinterHandler) BindPrinter(ctx *jxcontext.Context, mapData map[string]
|
||||
func (c *PrinterHandler) RebindPrinter(ctx *jxcontext.Context, lastBindResult *partner.BindPrinterResult) (bindResult *partner.BindPrinterResult, err error) {
|
||||
return nil, fmt.Errorf("%s打印机当前不支持扫码绑定", model.VendorChineseNames[model.VendorIDZhongWu])
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) EmptyPrintList(ctx *jxcontext.Context, id1, id2 string) (err error) {
|
||||
_, err = api.ZhongwuAPI.EmptyPrintQueue(id1, id2)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PlayText(ctx *jxcontext.Context, id1, id2, orderID, text string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
return c.GetPrinterStatus(ctx, id1, id2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user