This commit is contained in:
邹宗楠
2023-09-06 13:51:43 +08:00
parent a235007153
commit ab6db54205
26 changed files with 278 additions and 110 deletions

View File

@@ -153,7 +153,7 @@ func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *m
}
func pushMTPSToTiktok(msgStatus int, order *model.Waybill) {
result := &mtpsapi.RiderInfo{
result := &utils.RiderInfo{
OrderId: order.VendorOrderID,
ThirdCarrierOrderId: order.VendorOrderID,
CourierName: order.CourierName,
@@ -471,7 +471,7 @@ func (c *DeliveryHandler) GetRidderPosition(ctx *jxcontext.Context, vendorOrgCod
}
// 获取骑手信息 美团配送 deliveryId,mtPeisongId这两参数美团专属
func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeisongId string) (rider *mtpsapi.RiderInfo, err error) {
func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeisongId string) (rider *utils.RiderInfo, err error) {
// 获取订单状态
order, err := api.MtpsAPI.QueryOrderStatus(deliveryId, mtPeisongId)
if err != nil {
@@ -483,12 +483,12 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
if err != nil {
return nil, err
}
result := &mtpsapi.RiderInfo{
result := &utils.RiderInfo{
OrderId: orderId,
ThirdCarrierOrderId: utils.Interface2String(order["mt_peisong_id"]),
CourierName: utils.Interface2String(order["courier_name"]),
CourierPhone: utils.Interface2String(order["courier_phone"]),
LogisticsProviderCode: mtpsapi.MTPsCode,
LogisticsProviderCode: utils.MTPsCode,
LogisticsStatus: int(utils.MustInterface2Int64(order["status"])), // 默认正在配送中
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lat)),
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lng)),