From 70ea2de269f8177c4e4c1fc0c4572aea750590cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 11 Jan 2024 14:48:16 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/cms.go | 1 + business/jxstore/cms/store_sku.go | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index 9365bee46..3d8c1eb3a 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -686,6 +686,7 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way courierDistance = float64(v.Distance) } nowCourierDrop := int64(math.Ceil((courierDistance / float64(v.Distance)) * float64(len(riderLine)))) // 当前骑手骑行距离,占中的骑行距离百分比. + v.CourierCoordinate = riderLine[nowCourierDrop] if nowCourierDrop >= int64(len(riderLine)) { v.CourierCoordinate = riderLine[nowCourierDrop-1] } diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index b22cdd0e9..800ae5250 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -6692,16 +6692,23 @@ func BatchSetRestockingPrice(ctx *jxcontext.Context, preData map[string][]mtwmap } // BatchSetMTBoxPrice 批量修改美团包装费为0 -//func BatchSetMTBoxPrice(jxStoreId []int64) error { -// utils.CallFuncAsync(func() { -// for _, v := range jxStoreId { -// storeSkuList, err := dao.GetStoresSkusInfo(dao.GetDB(), []int{int(v)}, nil) -// if err != nil { -// return -// } -// -// +//func BatchSetMTBoxPrice(jxStoreId []int) error { +// var db = dao.GetDB() +// for _, v := range jxStoreId { +// storeSkuList, err := dao.GetStoresSkusInfo(db, []int{v}, nil) +// if err != nil { +// return err // } +// +// storeDetail, err := dao.GetStoreDetail(db, v, model.VendorIDMTWM, "") +// if err != nil { +// return err +// } +// +// } +// +// utils.CallFuncAsync(func() { +// // }) // return nil //}