饿百售后订单状态判断优化

This commit is contained in:
renyutian
2019-03-21 18:09:46 +08:00
parent fad5f02c22
commit dd040ac664

View File

@@ -21,7 +21,9 @@ func OnFinancialMsg(msg *ebaiapi.CallbackMsg) (err error) {
}
}
} else if msg.Cmd == ebaiapi.CmdOrderUserCancel { // 全额退款处理
if utils.Interface2String(msg.Body["cancel_type"]) == ebaiapi.AfterOrderFinishedCancelType && (utils.Interface2String(msg.Body["type"]) == ebaiapi.OrderUserCancelSuccessA || utils.Interface2String(msg.Body["type"]) == ebaiapi.OrderUserCancelSuccessB) {
messageType := utils.Int64ToStr(utils.MustInterface2Int64(msg.Body["type"]))
if utils.Int64ToStr(utils.MustInterface2Int64(msg.Body["cancel_type"])) == ebaiapi.AfterOrderFinishedCancelType &&
(messageType == ebaiapi.OrderUserCancelSuccessA || messageType == ebaiapi.OrderUserCancelSuccessB) {
globals.SugarLogger.Debug(utils.Interface2String(msg.Body["refund_id"])) // 获得退款订单ID去本地数据库拿饿百消息推送只给了订单号但是没有查询全额退款的接口只有部分退款才可以查询
}
}