This commit is contained in:
邹宗楠
2023-09-26 09:38:51 +08:00
parent ab436c5180
commit 89b9906d2c
2 changed files with 6 additions and 3 deletions

View File

@@ -984,15 +984,17 @@ func (c *PurchaseHandler) CancelLogisticsByWmOrderId(order *model.GoodsOrder, re
}
// OrderLogisticsStatus 获取订单配送状态
func (c *PurchaseHandler) OrderLogisticsStatus(orderId string) (*utils.RiderInfo, error) {
func (c *PurchaseHandler) OrderLogisticsStatus(orderId string) (data *utils.RiderInfo, err error) {
orderInfo, err := dao.GetSimpleOrder(dao.GetDB(), orderId)
if err != nil {
return nil, errors.New("获取本地门店账号信息失败,请重试")
data.LogisticsStatus = 0
return data, errors.New("获取本地门店账号信息失败,请重试")
}
waybill, err := getAPI(orderInfo.VendorOrgCode, 0, "").GetShipmentInfo(utils.Str2Int64(orderInfo.VendorOrderID), 0, tiktokShop.ShipmentTypeInvoice)
if err != nil {
return nil, err
data.LogisticsStatus = 0
return data, err
}
result := &utils.RiderInfo{