1
This commit is contained in:
@@ -3,8 +3,6 @@ package tao_vegetable
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -13,11 +11,12 @@ import (
|
||||
// OnCallbackMsg 淘宝回调接口
|
||||
func OnCallbackMsg(orderStatus, orderId string, msg interface{}) (response *tao_vegetable.CallBackResult) {
|
||||
if CurPurchaseHandler != nil {
|
||||
jxutils.CallMsgHandlerAsync(func() {
|
||||
response = CurPurchaseHandler.onOrderMsg(orderStatus, orderId, msg)
|
||||
}, jxutils.ComposeUniversalOrderID(orderId, model.VendorIDTaoVegetable))
|
||||
return CurPurchaseHandler.onOrderMsg(orderStatus, orderId, msg)
|
||||
//jxutils.CallMsgHandlerAsync(func() {
|
||||
// response = CurPurchaseHandler.onOrderMsg(orderStatus, orderId, msg)
|
||||
//}, jxutils.ComposeUniversalOrderID(orderId, model.VendorIDTaoVegetable))
|
||||
}
|
||||
return response
|
||||
return tao_vegetable.CallBackResultInfo(nil)
|
||||
}
|
||||
|
||||
func forwardOrderToGy(msg *mtwmapi.CallbackMsg, orderStatus string) {
|
||||
|
||||
@@ -351,13 +351,8 @@ func (c *PurchaseHandler) onOrderMsg(orderStatus, orderId string, orderCallback
|
||||
// 商户接单/支付完成代表新订单
|
||||
if msg.OrderStatus == tao_vegetable.OrderStatusPayFinsh {
|
||||
order, orderMap, err2 := c.getOrder("", msg.BizOrderId, msg.StoreId)
|
||||
globals.SugarLogger.Debugf("=======msg:= %s", utils.Format4Output(msg, false))
|
||||
globals.SugarLogger.Debugf("=======order:= %s", utils.Format4Output(order, false))
|
||||
globals.SugarLogger.Debugf("=======orderMap:= %s", utils.Format4Output(orderMap, false))
|
||||
globals.SugarLogger.Debugf("=======err2:= %v", err2)
|
||||
if err = err2; err == nil {
|
||||
err = partner.CurOrderManager.OnOrderNew(order, status)
|
||||
globals.SugarLogger.Debugf("=======err:= %s", utils.Format4Output(err, false))
|
||||
if err == nil {
|
||||
utils.CallFuncAsync(func() {
|
||||
if msg.OrderStatus == tao_vegetable.OrderStatusPayFinsh {
|
||||
|
||||
Reference in New Issue
Block a user