Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -942,7 +942,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
if valid["printerKey"] == nil {
|
||||
valid["printerKey"] = store.PrinterKey
|
||||
}
|
||||
newID1, newID2, err2 := handler.RegisterPrinter(ctx, valid["printerSN"].(string), valid["printerKey"].(string), store.Name)
|
||||
newID1, newID2, err2 := handler.RegisterPrinter(ctx, valid["printerSN"].(string), valid["printerKey"].(string), store.Name, int64(store.ID))
|
||||
if err = err2; err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -1254,7 +1254,7 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i
|
||||
if handler == nil {
|
||||
return 0, fmt.Errorf("不支持的打印机厂商ID:%d", store.PrinterVendorID)
|
||||
}
|
||||
newID1, newID2, err2 := handler.RegisterPrinter(ctx, store.PrinterSN, store.PrinterKey, store.Name)
|
||||
newID1, newID2, err2 := handler.RegisterPrinter(ctx, store.PrinterSN, store.PrinterKey, store.Name, int64(store.ID))
|
||||
if err = err2; err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -1362,7 +1362,7 @@ func CreateStore2JX(ctx *jxcontext.Context, storeExt *StoreExt, userName string)
|
||||
if handler == nil {
|
||||
return 0, fmt.Errorf("不支持的打印机厂商ID:%d", store.PrinterVendorID)
|
||||
}
|
||||
newID1, newID2, err2 := handler.RegisterPrinter(ctx, store.PrinterSN, store.PrinterKey, store.Name)
|
||||
newID1, newID2, err2 := handler.RegisterPrinter(ctx, store.PrinterSN, store.PrinterKey, store.Name, int64(store.ID))
|
||||
if err = err2; err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
@@ -111,6 +112,11 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
|
||||
}
|
||||
dao.Commit(db, txDB)
|
||||
}
|
||||
|
||||
// 打印门第离线消息
|
||||
if storeStatus < model.StoreStatusOpened && storeDetail.PrinterVendorID == model.VendorIDJxprint {
|
||||
netprinter.PrintStoreStatus(jxcontext.AdminCtx, storeDetail, vendorID, 0)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user