- 支持易联云开放应用

This commit is contained in:
gazebo
2019-07-11 10:41:45 +08:00
parent e8f93aed2d
commit 630f1b02e6
15 changed files with 249 additions and 61 deletions

View File

@@ -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,

View File

@@ -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) {