- 支持易联云开放应用
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/dadaapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/feieapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
@@ -511,6 +510,9 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
if valid["originalName"] != nil {
|
||||
delete(valid, "originalName")
|
||||
}
|
||||
if valid["printerBindInfo"] != nil {
|
||||
delete(valid, "printerBindInfo")
|
||||
}
|
||||
syncStatus := model.SyncFlagModifiedMask
|
||||
if valid["name"] != nil {
|
||||
valid["name"] = jxutils.FormalizeName(valid["name"].(string))
|
||||
@@ -691,27 +693,6 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i
|
||||
return 0, err
|
||||
}
|
||||
|
||||
func addNetPrinter(sn, key, storeName string) (err error) {
|
||||
name := storeName
|
||||
_, no, err := api.FeieAPI.PrinterAddList([]*feieapi.PrinterInfo{
|
||||
&feieapi.PrinterInfo{
|
||||
SN: sn,
|
||||
Key: key,
|
||||
Name: name,
|
||||
},
|
||||
})
|
||||
if err == nil {
|
||||
if no[sn] != "" {
|
||||
if no[sn] == feieapi.ErrMsgAlredyAdded {
|
||||
api.FeieAPI.PrinterEdit(sn, name, "")
|
||||
} else {
|
||||
err = fmt.Errorf("添加打印机出错:%s", no[sn])
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func GetStoreVendorMaps(ctx *jxcontext.Context, db *dao.DaoDB, storeID int, vendorID int) (storeMaps []*model.StoreMap, err error) {
|
||||
cond := map[string]interface{}{
|
||||
model.FieldStoreID: storeID,
|
||||
|
||||
@@ -153,6 +153,7 @@ func doDailyWork() {
|
||||
cms.EnableHaveRestStores(jxcontext.AdminCtx, true, true)
|
||||
// cms.CurVendorSync.FullSyncStoresSkus(jxcontext.AdminCtx, dao.GetDB(), []int{model.VendorIDJD}, nil, true, true)
|
||||
cms.CurVendorSync.SyncStoresSkus(jxcontext.AdminCtx, dao.GetDB(), []int{model.VendorIDJD, model.VendorIDEBAI, model.VendorIDMTWM}, nil, nil, false, true, true)
|
||||
// netprinter.RebindAllPrinters(jxcontext.AdminCtx, false, true)
|
||||
}
|
||||
|
||||
func ScheduleTimerFunc(handler func(), timeList []string) {
|
||||
|
||||
Reference in New Issue
Block a user