This commit is contained in:
邹宗楠
2024-08-01 15:22:55 +08:00
parent e19d3ed472
commit 60c8e31cc6
6 changed files with 184 additions and 90 deletions

View File

@@ -643,6 +643,13 @@ func (c *PurchaseHandler) callbackMsg2Status(msg *ebaiapi.CallbackMsg) (orderSta
if msgType == ebaiapi.OrderPartRefuncTypeMerchant && status == ebaiapi.OrderPartRefundSuccess {
orderStatus.VendorStatus = fakeOrderAdjustFinished
}
} else if msg.Cmd == ebaiapi.CmdOrderReversePush {
msgType := int(utils.MustInterface2Int64(msg.Body["operator_role"]))
status := int(utils.MustInterface2Int64(msg.Body["refund_status"]))
orderStatus.Remark = buildFullReason(utils.Interface2String(msg.Body["reason"]), utils.Interface2String(msg.Body["addition_reason"]))
if msgType == ebaiapi.OrderReverseRefuncTypeMerchant && status == ebaiapi.OrderReversePushApplySuccess {
orderStatus.VendorStatus = fakeOrderAdjustFinished
}
} else if status, ok := msg.Body["status"]; ok {
if vendorStatus, ok := status.(string); ok {
orderStatus.VendorStatus = vendorStatus
@@ -651,6 +658,7 @@ func (c *PurchaseHandler) callbackMsg2Status(msg *ebaiapi.CallbackMsg) (orderSta
}
orderStatus.Remark = utils.Interface2String(msg.Body["reason"])
}
if orderStatus.Status == 0 {
orderStatus.Status = c.getStatusFromVendorStatus(orderStatus.VendorStatus)
}