删除日志

This commit is contained in:
邹宗楠
2022-10-24 11:22:38 +08:00
parent 5a47102894
commit 5d6a5a3226
139 changed files with 17 additions and 787 deletions

View File

@@ -27,11 +27,9 @@ func OnFinancialMsg(msg *mtwmapi.CallbackMsg) (err error) {
if msg.Cmd == mtwmapi.MsgTypeOrderRefund { // todo 全额退款处理
orderData := msg.FormData
if orderData.Get("notify_type") == mtwmapi.NotifyTypeSuccess {
globals.SugarLogger.Debug(orderData.Get("order_id")) // 获得退款订单ID去本地数据库拿饿百消息推送只给了订单号也没有通过订单号查询退款信息的接口
afsOrderID := orderData.Get("order_id")
orderFinancial, err := partner.CurOrderManager.LoadOrderFinancial(afsOrderID, model.VendorIDMTWM)
if err == nil {
globals.SugarLogger.Debug(utils.Format4Output(orderFinancial, false))
err = partner.CurOrderManager.SaveAfsOrderFinancialInfo(CurPurchaseHandler.OrderFinancialDetail2Refund(orderFinancial, orderData))
} else {
globals.SugarLogger.Warnf("mtwm OnFinancialMsg, afsOrderID:%s is not found from partner.CurOrderManager.LoadOrderFinancial", afsOrderID)
@@ -54,13 +52,11 @@ func (p *PurchaseHandler) OrderFinancialDetail2Refund(orderFinancial *model.Orde
PmSubsidyMoney: orderFinancial.PmSubsidyMoney,
}
order, err := partner.CurOrderManager.LoadOrder(afsOrder.VendorOrderID, afsOrder.VendorID)
globals.SugarLogger.Debug(utils.Format4Output(order, false))
if err == nil {
afsOrder.JxStoreID = order.JxStoreID
afsOrder.VendorStoreID = order.VendorStoreID
afsOrder.StoreID = order.StoreID
} else {
globals.SugarLogger.Warnf("mtwm AfsOrderDetail2Financial, afsOrderID:%s is not found from partner.CurOrderManager.LoadOrder", afsOrder.VendorOrderID)
err = nil
}
for _, sku := range orderFinancial.Skus {
@@ -99,7 +95,6 @@ func (p *PurchaseHandler) AfsOrderDetail2Financial(orderData url.Values) (afsOrd
// if orderData.Get("timestamp") != "" {
// afsOrder.AfsCreateAt = utils.Timestamp2Time(utils.Str2Int64(orderData.Get("timestamp")))
// } else {
// globals.SugarLogger.Warnf("ebai OrderFinancialDetail2Refund timestamp is not found in afsOrder:%s", afsOrder.AfsOrderID)
// afsOrder.AfsCreateAt = time.Now()
// }
order, err := partner.CurOrderManager.LoadOrder(afsOrder.VendorOrderID, afsOrder.VendorID)