1
This commit is contained in:
@@ -4,6 +4,11 @@ import (
|
||||
"crypto/sha1"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
@@ -17,10 +22,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -243,12 +244,15 @@ func (c *DeliveryHandler) callbackMsg2Waybill(msg *mtpsapi.CallbackOrderMsg) (re
|
||||
StatusTime: utils.Timestamp2Time(msg.Timestamp),
|
||||
Remark: msg.CancelReason,
|
||||
}
|
||||
retVal.VendorOrderID, retVal.OrderVendorID = jxutils.SplitUniversalOrderID(msg.OrderID)
|
||||
good, err := partner.CurOrderManager.LoadOrder(msg.OrderID, model.VendorIDMTWM)
|
||||
var good *model.GoodsOrder
|
||||
sql := `SELECT * FROM goods_order WHERE vendor_order_id = ? ORDER BY order_created_at DESC LIMIT 1 OFFSET 0`
|
||||
sqlParams := []interface{}{msg.OrderID}
|
||||
err := dao.GetRow(dao.GetDB(), &good, sql, sqlParams)
|
||||
if err != nil || good == nil || good.VendorOrderID == "" {
|
||||
retVal.OrderVendorID = 0
|
||||
} else {
|
||||
retVal.OrderVendorID = good.VendorID
|
||||
retVal.VendorOrderID = good.VendorOrderID
|
||||
}
|
||||
return retVal, good
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user