- 饿百常量命名修改,支持用户申请取消与调整单

This commit is contained in:
gazebo
2019-04-18 17:39:23 +08:00
parent aedf0547e6
commit e5fbdec9ba
4 changed files with 49 additions and 19 deletions

View File

@@ -21,8 +21,8 @@ func OnFinancialMsg(msg *ebaiapi.CallbackMsg) (err error) {
}
} else if msg.Cmd == ebaiapi.CmdOrderUserCancel { // 全额退款处理
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) {
if utils.Int64ToStr(utils.MustInterface2Int64(msg.Body["cancel_type"])) == ebaiapi.OrderUserCancelTypeAfterSale &&
(messageType == ebaiapi.OrderUserCancelCSAgreed || messageType == ebaiapi.OrderUserCancelMerchantAgreed) {
globals.SugarLogger.Debug(utils.Interface2String(msg.Body["order_id"])) // 获得退款订单ID去本地数据库拿饿百消息推送只给了订单号但是没有查询全额退款的接口只有部分退款才可以查询
afsOrderID := utils.Interface2String(msg.Body["order_id"])
orderFinancial, err := partner.CurOrderManager.LoadOrderFinancial(afsOrderID, model.VendorIDEBAI)