aa
This commit is contained in:
@@ -1638,6 +1638,13 @@ func GetStoreCourierMaps(ctx *jxcontext.Context, db *dao.DaoDB, storeID int, ven
|
||||
}
|
||||
}
|
||||
}
|
||||
handler := partner.GetDeliveryPlatformFromVendorID(vendorID).Handler
|
||||
storeDetail, _ := handler.GetStore(ctx, storeID, "")
|
||||
for _, v := range storeCourierMaps {
|
||||
if v.VendorStoreName == "" {
|
||||
v.VendorStoreName = storeDetail.Name
|
||||
}
|
||||
}
|
||||
return storeCourierMaps, err
|
||||
}
|
||||
|
||||
@@ -1853,9 +1860,10 @@ func UpdateOrCreateCourierStores(ctx *jxcontext.Context, storeID int, isForceUpd
|
||||
}
|
||||
if _, err = updateOrCreateCourierStore(ctx, storeDetail); err == nil && isNeedAdd {
|
||||
storeCourier := &model.StoreCourierMap{
|
||||
VendorStoreID: storeDetail.VendorStoreID,
|
||||
Status: model.StoreStatusOpened,
|
||||
AuditStatus: storeDetail.AuditStatus,
|
||||
VendorStoreID: storeDetail.VendorStoreID,
|
||||
Status: model.StoreStatusOpened,
|
||||
AuditStatus: storeDetail.AuditStatus,
|
||||
VendorStoreName: storeDetail.Name,
|
||||
}
|
||||
if storeDetail.AuditStatus != model.StoreAuditStatusOnline {
|
||||
storeCourier.Status = model.StoreStatusDisabled
|
||||
@@ -2506,7 +2514,7 @@ func SyncStoresCourierInfo(ctx *jxcontext.Context, storeIDs []int, isAsync, isCo
|
||||
storeCourier, err2 := handler.Handler.GetStore(ctx, store.ID, storeDetail2.VendorStoreID)
|
||||
if err = err2; err == nil {
|
||||
if storeDetail2.AuditStatus == model.StoreAuditStatusCreated { // 如果已经通过审核,更新本地状态
|
||||
partner.CurStoreManager.OnCourierStoreStatusChanged(ctx, storeCourier.VendorStoreID, vendorID, storeCourier.AuditStatus)
|
||||
partner.CurStoreManager.OnCourierStoreStatusChanged(ctx, storeCourier.VendorStoreID, vendorID, storeCourier.AuditStatus, storeCourier.Comment)
|
||||
}
|
||||
|
||||
distance := jxutils.EarthDistance(jxutils.IntCoordinate2Standard(store.Lng), jxutils.IntCoordinate2Standard(store.Lat), jxutils.IntCoordinate2Standard(storeCourier.Lng), jxutils.IntCoordinate2Standard(storeCourier.Lat))
|
||||
|
||||
Reference in New Issue
Block a user