- GetServerInfo added.

This commit is contained in:
gazebo
2018-09-11 18:34:59 +08:00
parent 7f4c125279
commit 4dcc31e36d
11 changed files with 186 additions and 69 deletions

View File

@@ -62,10 +62,7 @@ func (p *PurchaseHandler) ReadStore(vendorStoreID string) (*model.Store, error)
return nil, err
}
func (p *PurchaseHandler) UpdateStore(vendorStoreID string, store *model.Store, userName string) error {
if !globals.EnableStoreWrite {
return nil
}
func (p *PurchaseHandler) UpdateStore(vendorStoreID string, store *model.Store, userName string) (err error) {
params := map[string]interface{}{
"outSystemId": utils.Int2Str(int(store.ID)),
"stationName": store.Name,
@@ -88,7 +85,10 @@ func (p *PurchaseHandler) UpdateStore(vendorStoreID string, store *model.Store,
}
_, params["closeStatus"] = JxStoreStatus2JdStatus(store.Status)
// globals.SugarLogger.Debug(utils.Format4Output(params, false))
return api.JdAPI.UpdateStoreInfo4Open(vendorStoreID, userName, params)
if globals.EnableStoreWrite {
err = api.JdAPI.UpdateStoreInfo4Open(vendorStoreID, userName, params)
}
return err
}
// 没用