This commit is contained in:
邹宗楠
2024-01-11 14:48:16 +08:00
parent 9394b7ae44
commit 70ea2de269
2 changed files with 17 additions and 9 deletions

View File

@@ -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]
}

View File

@@ -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
//}