- wrong use and implementation of GetMultiStoreHandler

This commit is contained in:
gazebo
2018-10-23 21:39:02 +08:00
parent 6abc2d694e
commit 853fd7c846
3 changed files with 8 additions and 8 deletions

View File

@@ -291,7 +291,7 @@ func GetStoreVendorMaps(ctx *jxcontext.Context, db *dao.DaoDB, storeID int, vend
}
func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID int, storeMap *model.StoreMap, userName string) (outStoreMap *model.StoreMap, err error) {
if handler := CurVendorSync.GetMultiStoreHandler(vendorID); handler != nil {
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
store, err2 := handler.ReadStore(storeMap.VendorStoreID)
if err = err2; err == nil {
dao.WrapAddIDCULDEntity(storeMap, userName)
@@ -347,7 +347,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
db = dao.GetDB()
}
if vendorStoreID := utils.Interface2String(payload["vendorStoreID"]); vendorStoreID != "" {
if handler := CurVendorSync.GetMultiStoreHandler(vendorID); handler != nil {
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
jdStore, err2 := handler.ReadStore(vendorStoreID)
if err = err2; err == nil {
payload["deliveryType"] = jdStore.DeliveryType