- 整理partner.ReadStore
This commit is contained in:
@@ -477,10 +477,10 @@ func getMapCenter(storeList []*StoreExt) (lng, lat float64) {
|
||||
|
||||
func GetVendorStore(ctx *jxcontext.Context, vendorStoreID string, vendorID int) (retVal *StoreExt, err error) {
|
||||
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
|
||||
result, err2 := handler.ReadStore(vendorStoreID)
|
||||
result, err2 := handler.ReadStore(ctx, vendorStoreID)
|
||||
if err = err2; err == nil {
|
||||
retVal = &StoreExt{
|
||||
Store: *result,
|
||||
Store: result.Store,
|
||||
FloatLng: jxutils.IntCoordinate2Standard(result.Lng),
|
||||
FloatLat: jxutils.IntCoordinate2Standard(result.Lat),
|
||||
}
|
||||
@@ -727,7 +727,7 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID
|
||||
}
|
||||
userName := ctx.GetUserName()
|
||||
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
|
||||
store, err2 := handler.ReadStore(storeMap.VendorStoreID)
|
||||
store, err2 := handler.ReadStore(ctx, storeMap.VendorStoreID)
|
||||
if err = err2; err == nil || storeMap.IsSync == 0 {
|
||||
dao.WrapAddIDCULDEntity(storeMap, userName)
|
||||
storeMap.StoreID = storeID
|
||||
@@ -813,7 +813,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
}
|
||||
}
|
||||
if vendorStoreID := utils.Interface2String(valid["vendorStoreID"]); vendorStoreID != "" {
|
||||
vendorStoreInfo, err2 := storeHandler.ReadStore(vendorStoreID)
|
||||
vendorStoreInfo, err2 := storeHandler.ReadStore(ctx, vendorStoreID)
|
||||
if err = err2; err == nil {
|
||||
valid["deliveryType"] = vendorStoreInfo.DeliveryType
|
||||
}
|
||||
@@ -1243,7 +1243,7 @@ func GetStoresVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, v
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
storeMap := batchItemList[0].(*model.StoreMap)
|
||||
if handler := partner.GetPurchasePlatformFromVendorID(storeMap.VendorID); handler != nil {
|
||||
store, err2 := handler.ReadStore(storeMap.VendorStoreID)
|
||||
store, err2 := handler.ReadStore(ctx, storeMap.VendorStoreID)
|
||||
if err = err2; err == nil {
|
||||
retVal = []interface{}{&model.VendorStoreSnapshot{
|
||||
StoreID: storeMap.StoreID,
|
||||
|
||||
Reference in New Issue
Block a user