1
This commit is contained in:
@@ -342,14 +342,12 @@ func makeRiderInfo(fakeWayBill *model.Waybill, riderInfo *utils.RiderInfo) error
|
|||||||
if order.Status == model.OrderStatusCanceled {
|
if order.Status == model.OrderStatusCanceled {
|
||||||
return fmt.Errorf(utils.Int2Str(model.OrderStatusCanceled))
|
return fmt.Errorf(utils.Int2Str(model.OrderStatusCanceled))
|
||||||
}
|
}
|
||||||
storeId := 0
|
storeId := jxutils.GetSaleStoreIDFromOrder(order)
|
||||||
if order.StoreID != 0 {
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeId, order.VendorID, order.VendorOrgCode)
|
||||||
storeId = order.StoreID
|
if err != nil || storeDetail == nil {
|
||||||
} else {
|
globals.SugarLogger.Debugf("根据订单信息获取门店详情错误:%d %d", storeId, order.VendorID)
|
||||||
storeId = order.JxStoreID
|
return fmt.Errorf(utils.Int2Str(model.OrderStatusCanceled))
|
||||||
}
|
}
|
||||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), storeId, order.VendorID, order.VendorOrgCode)
|
|
||||||
|
|
||||||
waybill2, err := cms.GetSToURidingDistance2(jxutils.IntCoordinate2Standard(storeDetail.Lng), jxutils.IntCoordinate2Standard(storeDetail.Lat), jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), fakeWayBill.VendorOrderID)
|
waybill2, err := cms.GetSToURidingDistance2(jxutils.IntCoordinate2Standard(storeDetail.Lng), jxutils.IntCoordinate2Standard(storeDetail.Lat), jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), fakeWayBill.VendorOrderID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "百度地图骑行方案获取错误:", utils.Format4Output(err.Error(), false))
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "百度地图骑行方案获取错误:", utils.Format4Output(err.Error(), false))
|
||||||
@@ -448,6 +446,7 @@ func UpdateFakeWayBillToTiktok() {
|
|||||||
if err = makeRiderInfo(fakeWayBill[i], riderInfo); err != nil && err.Error() == utils.Int2Str(model.OrderStatusCanceled) {
|
if err = makeRiderInfo(fakeWayBill[i], riderInfo); err != nil && err.Error() == utils.Int2Str(model.OrderStatusCanceled) {
|
||||||
fakeWayBill[i].Status = model.OrderStatusCanceled
|
fakeWayBill[i].Status = model.OrderStatusCanceled
|
||||||
dao.UpdateEntity(dao.GetDB(), fakeWayBill[i], "Status")
|
dao.UpdateEntity(dao.GetDB(), fakeWayBill[i], "Status")
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("==============riderInfo : %s", utils.Format4Output(riderInfo, false))
|
globals.SugarLogger.Debugf("==============riderInfo : %s", utils.Format4Output(riderInfo, false))
|
||||||
if riderInfo.CourierName == "" && fakeWayBill[i].CourierName != "" {
|
if riderInfo.CourierName == "" && fakeWayBill[i].CourierName != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user