- jdapi.UpdateStoreInfo4Open2
This commit is contained in:
@@ -143,13 +143,15 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
storeParams.DeliveryRangeRadius = int(utils.Str2Int64WithDefault(store.DeliveryRange, 0))
|
||||
}
|
||||
}
|
||||
modifyCloseStatus := false
|
||||
if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagDeletedMask|model.SyncFlagStoreStatus) != 0 {
|
||||
modifyCloseStatus = true
|
||||
_, storeParams.CloseStatus = JxStoreStatus2JdStatus(jxutils.MergeStoreStatus(store.Status, store.JdStoreStatus))
|
||||
}
|
||||
fillOpTimeParams(storeParams, store.GetOpTimeList())
|
||||
globals.SugarLogger.Debug(utils.Format4Output(storeParams, false))
|
||||
if globals.EnableJdStoreWrite {
|
||||
if err = getAPI("").UpdateStoreInfo4Open2(storeParams); err != nil {
|
||||
if err = getAPI("").UpdateStoreInfo4Open2(storeParams, modifyCloseStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -208,7 +210,7 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask
|
||||
storeParams.OutSystemID = store.VendorStoreID
|
||||
}
|
||||
if globals.EnableJdStoreWrite {
|
||||
err = getAPI("").UpdateStoreInfo4Open2(storeParams)
|
||||
err = getAPI("").UpdateStoreInfo4Open2(storeParams, false)
|
||||
}
|
||||
return nil, err
|
||||
}, stores)
|
||||
@@ -300,7 +302,7 @@ func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, storeID int,
|
||||
StationNo: vendorStoreID,
|
||||
Operator: ctx.GetUserName(),
|
||||
CloseStatus: closeStatus,
|
||||
})
|
||||
}, true)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -335,7 +337,7 @@ func (c *PurchaseHandler) UpdateStoreOpTime(ctx *jxcontext.Context, storeID int,
|
||||
}
|
||||
fillOpTimeParams(params, opTimeList)
|
||||
if globals.EnableJdStoreWrite {
|
||||
err = getAPI("").UpdateStoreInfo4Open2(params)
|
||||
err = getAPI("").UpdateStoreInfo4Open2(params, false)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -457,7 +459,7 @@ func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorStor
|
||||
StationNo: vendorStoreID,
|
||||
Operator: ctx.GetUserName(),
|
||||
OutSystemID: utils.Int2Str(int(storeID)),
|
||||
})
|
||||
}, false)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user